home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / Notes.jar / lotus / domino / AppletBase.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-15  |  2.1 KB  |  82 lines

  1. package lotus.domino;
  2.  
  3. import java.applet.Applet;
  4.  
  5. public class AppletBase extends Applet {
  6.    private boolean m_debug = false;
  7.    private boolean isLocal = false;
  8.    private String IOR;
  9.  
  10.    public Session getSession() throws NotesException {
  11.       return this.getSession("", "");
  12.    }
  13.  
  14.    public Session getSession(String var1, String var2) throws NotesException {
  15.       try {
  16.          Session var3;
  17.          if (this.IOR == null) {
  18.             var3 = NotesFactory.createSession();
  19.          } else {
  20.             var3 = NotesFactory.createSession(this, var1, var2);
  21.          }
  22.  
  23.          return var3;
  24.       } catch (NotesException var5) {
  25.          System.err.println("Failed to get session- NotesException: " + var5.text);
  26.          throw var5;
  27.       }
  28.    }
  29.  
  30.    public final void init() {
  31.       this.IOR = ((Applet)this).getParameter("NOI_IOR");
  32.       if (this.IOR == null) {
  33.          NotesThread.sinitThread();
  34.          this.isLocal = true;
  35.       } else {
  36.          this.isLocal = false;
  37.       }
  38.  
  39.       this.notesAppletInit();
  40.    }
  41.  
  42.    public void notesAppletInit() {
  43.    }
  44.  
  45.    public final void start() {
  46.       this.notesAppletStart();
  47.    }
  48.  
  49.    public void notesAppletStart() {
  50.    }
  51.  
  52.    public final void stop() {
  53.       this.notesAppletStop();
  54.    }
  55.  
  56.    public void notesAppletStop() {
  57.    }
  58.  
  59.    public final void destroy() {
  60.       try {
  61.          this.notesAppletDestroy();
  62.       } finally {
  63.          if (this.isLocal) {
  64.             this.cleanupLocal();
  65.          }
  66.  
  67.       }
  68.  
  69.    }
  70.  
  71.    public void notesAppletDestroy() {
  72.    }
  73.  
  74.    private void cleanupLocal() {
  75.       NotesThread.stermThread();
  76.    }
  77.  
  78.    public boolean isNotesLocal() {
  79.       return this.isLocal;
  80.    }
  81. }
  82.