The agent code is straight forward.
代理代码很简单。
Now, let's move on to some server-side agent code.
接下来让我们看看服务器端代理代码。
Agent methods are run on each partition (in reduce agent code).
代理方法在每个分区上运行(在reduce代理代码中)。
Note: the agent code fragment here only shows the ToggleStatus action.
注意:此处的代理代码片段仅展示了ToggleStatus活动。
It is a good idea to already have your break point set in the agent code.
最好是代理代码中已经设置了断点。
Aggregation is performed back on the client again (also in reduce agent code).
再次对客户机执行聚合(也是在reduce代理代码中)。
From this, you can get an AgentManager, which provides the methods for asking the grid to execute your agent code.
通过此句柄,您可以获取AgentManager,它提供了请求网格执行您的代理代码的方法。
See Listing 9 for the reduce agent code you are going to run on each partition (Figure 3). The logic is very intuitive.
请参见清单9,了解将在每个分区上运行的reduce代理代码(图3)。
From the sample code TAB on the Stubby document, copy the example agent code that was generated and paste it into the agent.
从Stubby文档的samplecode附签上,复制所生成的示例代理代码,然后粘贴到代理中。
After you create the class, you can enter the rest of the agent code so that it looks like the agent from the Domino Designer example.
在创建类之后,就可以输入剩余的代理代码,从而使其看起来与DominoDesigner示例中的代理一样。
You may find it useful to look at the agent code to see how it does its database access task, but that goes beyond the scope of this article.
您也许会发现,检查代理代码以确定它如何完成其数据库访问任务会很有用,不过这超出了本文的范围。
Contrast this with a client application where one side of the connection is a message channel agent and the other is application code.
这与客户端应用程序形成鲜明对比,其中连接的一端是消息通道代理,另一端是应用程序代码。
We examine code snippets for each agent, explaining what each snippet is doing.
我们研究每个代理的代码片段,解释每个片段所做的工作。
You can create an agent with code similar to the code in listing 5, which creates the desired report.
您可以使用类似于清单5的代码创建一个代理,这将创建理想的报告。
Paste the copied code into this new agent.
将之前复制的代码粘贴到这个新代理中。
We describe the code for this agent later in this article.
我们将在本文后面部分讲述此代理的代码。
You do this by letting the agent perform a server-side redirect to your XML view as shown in the next line of code.
这是在代码的下一行中完成的,即让代理执行到您的xml视图的服务器端重定向操作。
The full code for this agent as well as for the client are available for download from the Downloads section.
如需获得此代理的完整代码及客户机的完整代码,请从“下载”一节下载。
The sample code implements a single agent.
示例代码实现一个单独的代理。
Fenced mode processes are created as separate system entities in order to isolate user-written fenced-mode code from the database manager agent process.
防护模式进程是作为单独的系统实体创建的,以便将用户编写的防护模式代码与数据库管理器代理进程隔离开来。
You can also send money to other people, who will be sent a text message containing a special code that can be taken to an agent to withdraw cash.
你也可以将资金寄给其他人,他们会收到手机短信,其中包含了可以从代理商那里取钱的密码。
Writing compliant code to these well-specified interfaces ensures our instrumentation and agent logic will work with any JMX 1.1-compatible implementation.
按照这些良好规定的接口编写符合规定的代码,确保了我们的工具和代理逻辑可以与任何兼容JMX 1.1的实现一起使用。
The code for the agent appears as follows.
该代理的代码如下所示。
Value-added agent logic is typically the code that we write.
增值代理逻辑通常是编写的代码。
As shown in the following code sample, the Sametime agent applet provides a method for using the JSObject API.
正如下面的示例代码中所显示的,Sametime代理applet提供了一种使用JSObjectAPI的方法。
The initial example referred to an agent scanning an RSS feed, so the code in Listing 4 follows up on that idea.
开始的示例引用一个扫描RSSfeed 的代理,因此清单4中的代码延续了这个思路。
With the remote agent listening, you could use the code snippet in Listing 4 to obtain a reference to the associated MBean server connection.
有了远程代理侦听,就可以使用清单4中的代码段获得相关MBean服务器连接的引用。
This approach provides flexibility for the IBM Cognos architects to perform the code deployment themselves by just running the Event Studio agent in the source IBM Cognos environment.
通过只在源ibmCognos环境中运行EventStudio代理,这种方法为IBM Cognos设计人员自己执行代码部署提供了灵活性。
Now that you have the class file, you can import that into the agent in Domino Designer and manage the code from within Eclipse.
现在已经有了类文件,我们可以将其导入DominoDesigner 中的代理中,并在 Eclipse中管理代码。
You can copy and paste this code into an agent and step through it with the LotusScript debugger to see it in action.
可以将这段代码粘贴到一个代理中,然后使用LotusScript调试器单步调试它,看看实际效果。
应用推荐