home *** CD-ROM | disk | FTP | other *** search
- package lotus.domino;
-
- import java.applet.Applet;
-
- public class AppletBase extends Applet {
- private boolean m_debug = false;
- private boolean isLocal = false;
- private String IOR;
-
- public Session getSession() throws NotesException {
- return this.getSession("", "");
- }
-
- public Session getSession(String var1, String var2) throws NotesException {
- try {
- Session var3;
- if (this.IOR == null) {
- var3 = NotesFactory.createSession();
- } else {
- var3 = NotesFactory.createSession(this, var1, var2);
- }
-
- return var3;
- } catch (NotesException var5) {
- System.err.println("Failed to get session- NotesException: " + var5.text);
- throw var5;
- }
- }
-
- public final void init() {
- this.IOR = ((Applet)this).getParameter("NOI_IOR");
- if (this.IOR == null) {
- NotesThread.sinitThread();
- this.isLocal = true;
- } else {
- this.isLocal = false;
- }
-
- this.notesAppletInit();
- }
-
- public void notesAppletInit() {
- }
-
- public final void start() {
- this.notesAppletStart();
- }
-
- public void notesAppletStart() {
- }
-
- public final void stop() {
- this.notesAppletStop();
- }
-
- public void notesAppletStop() {
- }
-
- public final void destroy() {
- try {
- this.notesAppletDestroy();
- } finally {
- if (this.isLocal) {
- this.cleanupLocal();
- }
-
- }
-
- }
-
- public void notesAppletDestroy() {
- }
-
- private void cleanupLocal() {
- NotesThread.stermThread();
- }
-
- public boolean isNotesLocal() {
- return this.isLocal;
- }
- }
-