JAVA/CORBA CLASSES


Accessing agents
Example

Two classes provide access to agents: AgentContext and Agent.

AgentContext

The AgentContext class provides a means to access attributes of the current agent environment for programs that are running as agents. Call getAgentContext in Session to get the current agent context; getAgentContext returns null if the program is not running as an agent.

The following methods access the AgentContext properties:


The unprocessedFTSearch, unprocessedFTSearchRange, and unprocessedSearch methods return DocumentCollection objects representing "unprocessed" documents that meet search criteria. The updateProcessedDoc method marks documents as "processed" for future searches for new and modified documents.

Agent

The Agent class represents an agent. You can access the current agent through getCurrentAgent in AgentContex. You can access all agents in a database through getAgents in Database. You can access a specified agent through getAgent in Database.

The following methods access the Agent properties:


The Agent class contains a remove method to remove the agent from the database; a run method to run the agent on the computer running the program; a runOnServer method to run the agent on the computer containing the agent's database; and a save method to save changes made by setServerName and setEnabled.

Example
See Also