public final class NotesProxyFactory extends DNotesFactory implements MonitorEnabled
| Modifier and Type | Class and Description |
|---|---|
class |
NotesProxyFactory.DNotesShutdownThread
Shutdown thread of Domingo, disposes all resources.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CACHE_THRESHOLD
Threshold size for weak cache.
|
static String |
DEFAULT_IIOP_SESSION_KEY
Key for map of default IIOP session.
|
static int |
MAX_DISPOSE_TRIES
Retry count while waiting for disposal.
|
static int |
TIME_WAIT_FOR_GC
Time to wait for garbage collector [milliseconds].
|
| Constructor and Description |
|---|
NotesProxyFactory()
Default constructor.
|
NotesProxyFactory(int threshold)
Package-private constructor to create a factory from within the Lotus Notes VM with
restricted security.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disposeInstance()
In this single threaded implementation, first the own reference
to the session is nulled and then we wait for the weak cache to
be finalized.
|
void |
disposeInstance(boolean force)
In this single threaded implementation, first the own reference
to the session is nulled and then we wait for the weak cache to
be finalized.
|
void |
disposeInternal(boolean force)
Deprecated.
use
disposeInternal(boolean) instead |
void |
gc()
Deprecated.
only use this method for testing
|
Cache |
getBaseCache()
Returns the central weak cache of all notes objects.
|
DNotesMonitor |
getMonitor()
Get the current monitor.
|
DSession |
getSession()
Creates a local session.
|
DSession |
getSession(Applet applet,
String user,
String passwd)
Creates a remote (IIOP) session for an applet.
|
DSession |
getSession(Object notesSession)
Creates a Domingo session for an existing Notes session.
|
DSession |
getSession(String serverUrl)
Creates a DIIOP session.
|
DSession |
getSession(String host,
String[] args,
String user,
String passwd)
Creates a remote (IIOP or Http) session with arguments using host name.
|
DSession |
getSession(String host,
String user,
String passwd)
Creates a remote (IIOP or Http) session using host name.
|
DSession |
getSessionSSL(String host,
String user,
String passwd)
Creates a remote (IIOP or Http) session with SSL using host name.
|
DSession |
getSessionWithFullAccess()
Creates a local session.
|
DSession |
getSessionWithFullAccess(String password)
Creates a local session.
|
void |
setMonitor(DNotesMonitor theMonitor)
Set the monitor.
|
void |
sinitThread()
Enables Notes access for the current thread.
|
void |
stermThread()
Disables Notes access for the current thread.
|
dispose, dispose, getBooleanProperty, getInstance, getInstance, getInstance, getInstance, getIntProperty, getProperty, newInstance, newInstance, newInstance, newInstance, setPropertypublic static final int MAX_DISPOSE_TRIES
public static final int TIME_WAIT_FOR_GC
public static final int DEFAULT_CACHE_THRESHOLD
public static final String DEFAULT_IIOP_SESSION_KEY
public NotesProxyFactory()
Must be public to allow abstract factory (the base class) to create an instance of this class.
public NotesProxyFactory(int threshold)
threshold - Threshold size for weak cachepublic Cache getBaseCache()
public void gc()
DNotesFactoryATTENTION:
This method should not be used in productive code. It only exists for tests, e.g. to ensure clean memory before analyzing with JProbe.
gc in class DNotesFactoryDNotesFactory.gc()public void disposeInternal(boolean force)
disposeInternal(boolean) insteadIn this single threaded implementation, first the own reference to the session is nulled and then we wait for the weak cache to be finalized.
disposeInternal in class DNotesFactoryforce - indicates if disposal should happen even if still any
strong or soft reference exists. if false,
only weak references must remain.DNotesFactory.dispose(),
DNotesFactory.dispose(boolean),
WeakReferencepublic void disposeInstance()
In this single threaded implementation, first the own reference to the session is nulled and then we wait for the weak cache to be finalized.
disposeInstance in class DNotesFactoryDNotesFactory.dispose(),
DNotesFactory.dispose(boolean),
WeakReferencepublic void disposeInstance(boolean force)
In this single threaded implementation, first the own reference to the session is nulled and then we wait for the weak cache to be finalized.
Equivalent to
{link disposeInstance(false)
disposeInstance in class DNotesFactoryforce - indicates if disposal should happen even if still any
strong or soft reference exists. if false,
only weak references must remain.DNotesFactory.dispose(),
DNotesFactory.dispose(boolean),
WeakReferencepublic DSession getSession() throws DNotesRuntimeException
(Notes client must be installed)
getSession in class DNotesFactoryDNotesRuntimeException - if the session cannot be createdDNotesFactory.getSession()public DSession getSession(String serverUrl) throws DNotesRuntimeException
getSession in class DNotesFactoryserverUrl - URL of server (e.g. "https://plato.acme:8080")DNotesRuntimeException - if the session cannot be createdDNotesFactory.getSession(java.lang.String)public DSession getSession(String host, String user, String passwd) throws DNotesRuntimeException
getSession in class DNotesFactoryhost - URL of server (e.g. "https://plato.acme:8080")user - user name for authenticationpasswd - password for for authenticationDNotesRuntimeException - if the session cannot be createdDNotesFactory.getSession(java.lang.String, java.lang.String, java.lang.String)public DSession getSessionSSL(String host, String user, String passwd) throws DNotesRuntimeException
getSessionSSL in class DNotesFactoryhost - URL of server (e.g. "https://plato.acme:8080")user - user name for authenticationpasswd - password for for authenticationDNotesRuntimeException - if the session cannot be createdDNotesFactory.getSessionSSL(java.lang.String, java.lang.String, java.lang.String)public DSession getSession(String host, String[] args, String user, String passwd) throws DNotesRuntimeException
getSession in class DNotesFactoryhost - URL of server (e.g. "https://plato.acme:8080")args - array of additional argumentsuser - user name for authenticationpasswd - password for for authenticationDNotesRuntimeException - if the session cannot be createdDNotesFactory.getSession(java.lang.String, java.lang.String[], java.lang.String, java.lang.String)public DSession getSession(Applet applet, String user, String passwd) throws DNotesRuntimeException
getSession in class DNotesFactoryapplet - applet instanceuser - user name for authenticationpasswd - password for for authenticationDNotesRuntimeException - if the session cannot be createdDNotesFactory.getSession(java.applet.Applet, java.lang.String, java.lang.String)public DSession getSession(Object notesSession) throws DNotesRuntimeException
This method is used only internally in Notes agents and Notes applets.
getSession in class DNotesFactorynotesSession - existing Notes sessionDNotesRuntimeException - if the session cannot be createdDNotesFactory.getSession(java.lang.Object)public DSession getSessionWithFullAccess() throws DNotesRuntimeException
(Notes client must be installed)
Access restrictions according to readers items are bypassed.
getSessionWithFullAccess in class DNotesFactoryDNotesRuntimeException - if the session cannot be createdDNotesFactory.getSessionWithFullAccess()public DSession getSessionWithFullAccess(String password) throws DNotesRuntimeException
(Notes client must be installed)
Access restrictions according to readers items are bypassed.
getSessionWithFullAccess in class DNotesFactorypassword - password for for authenticationDNotesRuntimeException - if the session cannot be createdDNotesFactory.getSessionWithFullAccess(java.lang.String)public void sinitThread()
DNotesFactorysinitThread in class DNotesFactoryDNotesFactory.sinitThread()public void stermThread()
DNotesFactorystermThread in class DNotesFactoryDNotesFactory.stermThread()public DNotesMonitor getMonitor()
getMonitor in interface MonitorEnabledgetMonitor in class DNotesFactoryDNotesFactory.getMonitor()public void setMonitor(DNotesMonitor theMonitor)
setMonitor in interface MonitorEnabledsetMonitor in class DNotesFactorytheMonitor - the monitorDNotesFactory.setMonitor(DNotesMonitor)Copyright © 2005–2020. All rights reserved.