JAVA/CORBA CLASSES


AgentContext class
Example

Represents the agent environment of the current program, if an agent is running it.

Syntax

public class AgentContext extends Base

Containment

Contained by: Session

Contains: Agent, Database, DateTime, Document, DocumentCollection

Properties

CurrentAgent through getCurrentAgent

CurrentDatabase through getCurrentDatabase

DocumentContext through getDocumentContext

EffectiveUserName through getEffectiveUserName

LastExitStatus through getLastExitStatus

LastRun through getLastRun

SavedData through getSavedData

UnprocessedDocuments through getUnprocessedDocuments

Methods

recycle

toString

unprocessedFTSearch

unprocessedFTSearchRange

unprocessedSearch

updateProcessedDoc

Creation and access

Use getAgentContext in Session to get the AgentContext object for the current agent.

Usage

You can create a Java agent by importing files or by writing and compiling the code in Lotus Domino Designer. In the latter case, Lotus Domino Designer provides template code that creates a Session object named session and an AgentContext object named agentContext. The complete template code appears as follows:

import lotus.domino.*;
public class JavaAgent extends AgentBase {
 public void NotesMain() {
   try {
     Session session = getSession();
     AgentContext agentContext =
         session.getAgentContext();
     // (Your code goes here)
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

Example
See Also