编译器接受每一个方面,并建立包含通知代码的类文件。
The compiler takes each aspect and creates class files that contain the advice code.
ServiceRegistry提供允许编写自定义验证和通知代码的验证和通知接口。
The Service Registry provides validation and notification interfaces, which allows you to write custom validation and notification code.
清单4显示了一个典型的消息传递事件,即发布拍卖系统中的一个新的高投标通知和产生该事件的代码。
Listing 4 shows a typical messaging event, posting notification of a new high bid in an auction system, and the code that generates it.
因此,当收到一个通知或一个“停止”消息时,所有用于这一情况的代码将被执行。
So, when react receives a Notify or a “stop” message all of the code for that case is executed.
通知可以包含认证代码,或者就像在这个示例中一样,可以调用其他方法。
The advice can contain the authentication code or, as in this case, it can invoke another method.
警报会发出新代码已可用的通知,只需单击鼠标就能安装更新。
Alerts provide notification that new code is available, and updates are installed with a click of the mouse.
如果同时让客户机代码运行,那么也会看到这些操作的通知。
If you leave the client code running while you do this, you'll see the notifications for those actions as well.
清单3给出了通知订阅器的一个非常简单的实现(删除了重复代码)。
A very simple implementation of a notification subscriber (omitting repeated code) is presented in Listing 3.
那样,当模型发出通知时,将运行最少量的代码,只刷新发生更改的部分。
That way, when the model notifies, you run the least amount of code to refresh only what has changed.
相关代码只显示一个常见错误消息,通知用户发生了什么错误。
The associated code simply displays a custom error message telling the user what went wrong.
示例代码首先解析通知源以确定任务ID。
The sample code initially parses the source of the notification to determine the task ID.
清单2给出了通知使用者的一个非常简单的实现(删除了重复代码)。
A very simple implementation of notification consumer (omitting repeated code) is presented in Listing 2.
客户机代码将轮询输出队列以获得响应,或等待响应消息交付时的回调通知。
The client code would either poll the output queue for the response or wait for some kind of call-back notification when the response message has been delivered.
清单4中的代码实现了一个简单的解析器,它假设我们使用冒号分隔好友ID和相关的通知,并使用分号分隔后续通知。
The code in listing 4 implements a crude parser that assumes that we use colons to separate buddy IDs from the associated note and semicolons to separate subsequent notes.
然后代码开发者会修复问题,并通知评审者,而评审者必须确认每个问题都得到了解决。
Authors then fix the problems and notify reviewers, and reviewers must then verify that each issue is resolved.
清单5给出了通知订阅器的一个非常简单的实现(删除了重复代码)。
A simple implementation of notification subscriber (omitting repeated code) is presented in Listing 5.
反过来,这些代码也能提供无降水警报,便捷地通知您:可以从车里走出来了。
Conversely, the same code is used to produce alerts when a no-precipitation window has opened, giving you a handy notice of when it's time to dash inside from your car.
如何与连接点上的其他测试类型、其他通知、运行该连接点的其他代码交互呢?
How does this interact with other kinds of tests at the join point, with other advice at the join point, and with any code that runs the join point?
改进代码以便更高效地发现通知和资源属性。
Improving the code to make notification and resource property discovery more efficient.
要侦听更多的事件通知,只需多添加几行filter.enableType代码即可。
To listen to more event notifications, simply add more filter.enableType code lines.
请注意,注册通知的代码使用的是 addNotificationListener方法。
Notice that the code that registers the notification uses the addNotificationListener method.
设置RETAINCallCenterAPAR关闭代码,通知用户该问题将在某个即将出版的产品版本中得到解决。
A RETAIN Call Center APAR close code can be set to inform the user that their problem will be addressed in a certain upcoming product release.
在该部分将论述如何使用SubscriberHelper更改客户端代码以支持订阅通知消息。
In this section you see how you must modify the client code to support subscribing to notification messages using the SubscriberHelper.
此代码惟一的问题是推迟了错误通知,这也是多数Ajax程序员不采用这一方法的原因。
The only concern with this code — and the reason most Ajax programmers don't use this approach — is that it delays error notification.
生成的代码还提供通知、参照完整性和可定制的 XMI 持久性。
The generated code provides notification, and referential integrity.
通知测试团队及时改写代码(请看图12)。
Inform the test team about the reworked code in time. (See Figure 12.)
对于运行连接点的代码,与通常的around通知不同的是,它对每个配置都调用proceed(. .)一次,因此底层连接点可运行多次。
As for code running the join point, unlike the usual around advice, this one calls proceed (..) once for each configuration, so the underlying join point can run many times.
如果方面包含影响项目中的代码的通知(advice),那么应当看到CrossReferences视图中出现一些条目,并且编辑器的左侧会出现一些标记。
If your aspect contains advice that affects code in your project, you should see some entries appear in the Cross References view and some markers down the left side of the editor.
IBMCognos管理员和各个用户群体将接到有关代码部署状态的邮件通知。
The IBM Cognos administrators and the respective user community will be notified by an email on the status of the code deployment.
你想要使用已有代码作为通知,而且不想引入AspectJ注解:比如,引入一个Observer行为调用任意pojo的方法。
You want to use existing code as advice, and don't want to introduce AspectJ annotations into it: for example, introducing an Observer behavior invoking a method on an arbitrary POJO.
应用推荐