JAVA/CORBA CLASSES


Examples: MaxSize and Size properties
This agent prints the size of the current database.

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();
     String title = db.getTitle();
     double size = db.getSize();
     System.out.println
     ("The size of database \"" + title +
     "\" is" + (int)size + " bytes");
     long maxsize = db.getMaxSize();
     System.out.println
     ("The maximum size of database \"" + title +
     "\" is" + maxsize + " kilobytes");
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also