JAVA/CORBA CLASSES


Examples: getAgent method
This agent prints the owner, last run date, and query for the agent named "Update Thread Maps."

import lotus.domino.*;
public class JavaAgent extends AgentBase {
 public void NotesMain() {
   try {
     Session session = getSession();
     AgentContext agentContext =
         session.getAgentContext();
     // (Your code goes here)
     Database db = agentContext.getCurrentDatabase();
     Agent agent = db.getAgent("My Agent");
     System.out.println("Agent:\t" + agent.getName());
     System.out.println("Owner:\t" + agent.getOwner());
     System.out.println(
         "Last run:\t" + agent.getLastRun());
     System.out.println("Query:\t" + agent.getQuery());
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also