|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.bea.domingo.DNotesFactory de.bea.domingo.service.NotesServiceFactory
public final class NotesServiceFactory
Factory for sessions to Notes/Domino.
Local calls are processed in a thread pool with notes thread registered with a local client installation. Each call to the getSession() method returns the same instance.
Corba calls are always processed in the calling thread. Each call to a getSession(...) with arguments returns a new instance, so it is up to the caller to ensure proper disposal of the sessions.
Field Summary | |
---|---|
static int |
DEFAULT_THREADPOOL_SIZE
Default number of threads in thread pool. |
static long |
DEFAULT_TIMEOUT
Default timeout. |
Constructor Summary | |
---|---|
NotesServiceFactory()
Default constructor. |
Method Summary | |
---|---|
void |
disposeInstance()
Disposes all internal resources of the Notes connection. |
void |
disposeInstance(boolean force)
Disposes all internal resources of the Notes connection. |
void |
disposeInternal(boolean force)
Deprecated. use disposeInstance(boolean) instead |
void |
gc()
Deprecated. only use this method for testing |
DNotesMonitor |
getMonitor()
Get the current monitor. |
DSession |
getSession()
Creates a local session. |
DSession |
getSession(java.applet.Applet applet,
java.lang.String user,
java.lang.String password)
Creates a remote (IIOP) session for an applet. |
DSession |
getSession(java.lang.Object notesSession)
Creates a Domingo session for an existing Notes session. |
DSession |
getSession(java.lang.String serverUrl)
Creates a DIIOP session. |
DSession |
getSession(java.lang.String host,
java.lang.String[] args,
java.lang.String user,
java.lang.String passwd)
Creates a remote (IIOP or Http) session with arguments using host name. |
DSession |
getSession(java.lang.String host,
java.lang.String user,
java.lang.String passwd)
Creates a remote (IIOP or Http) session using host name. |
DSession |
getSessionSSL(java.lang.String host,
java.lang.String user,
java.lang.String passwd)
Creates a remote (IIOP or Http) session with SSL using host name. |
DSession |
getSessionWithFullAccess()
Creates a local session. |
DSession |
getSessionWithFullAccess(java.lang.String password)
Creates a local session. |
(package private) java.lang.Object |
invoke(java.lang.Object object,
java.lang.reflect.Method method,
java.lang.Object[] args)
Invokes a method within a Thread from the thread pool. |
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. |
Methods inherited from class de.bea.domingo.DNotesFactory |
---|
dispose, dispose, getBooleanProperty, getInstance, getInstance, getInstance, getInstance, getIntProperty, getProperty, newInstance, newInstance, newInstance, newInstance, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long DEFAULT_TIMEOUT
public static final int DEFAULT_THREADPOOL_SIZE
Constructor Detail |
---|
public NotesServiceFactory() throws DNotesRuntimeException
Must be public to allow abstract factory (the base class) to create an instance of this class.
DNotesRuntimeException
- if the factory cannot be createdMethod Detail |
---|
public DSession getSession(java.lang.Object notesSession) throws DNotesRuntimeException
This method is used only internally in Notes agents and Notes applets.
getSession
in class DNotesFactory
notesSession
- existing Notes session
DNotesRuntimeException
- if the session cannot be createdDNotesFactory.getSession(java.lang.Object)
public DSession getSession() throws DNotesRuntimeException
(Notes client must be installed)
getSession
in class DNotesFactory
DNotesRuntimeException
- if the session cannot be createdDNotesFactory.getSession()
public DSession getSession(java.lang.String serverUrl) throws DNotesRuntimeException
getSession
in class DNotesFactory
serverUrl
- URL of server (e.g. "https://plato.acme:8080")
DNotesRuntimeException
- if the session cannot be createdDNotesFactory.getSession(java.lang.String)
public DSession getSession(java.lang.String host, java.lang.String user, java.lang.String passwd) throws DNotesRuntimeException
getSession
in class DNotesFactory
host
- URL of server (e.g. "https://plato.acme:8080")user
- user name for authenticationpasswd
- password for for authentication
DNotesRuntimeException
- if the session cannot be createdDNotesFactory.getSession(java.lang.String,
java.lang.String, java.lang.String)
public DSession getSession(java.lang.String host, java.lang.String[] args, java.lang.String user, java.lang.String passwd) throws DNotesRuntimeException
getSession
in class DNotesFactory
host
- URL of server (e.g. "https://plato.acme:8080")args
- array of additional argumentsuser
- user name for authenticationpasswd
- password for for authentication
DNotesRuntimeException
- if the session cannot be createdDNotesFactory.getSession(java.lang.String, java.lang.String[], java.lang.String, java.lang.String)
public DSession getSessionSSL(java.lang.String host, java.lang.String user, java.lang.String passwd) throws DNotesRuntimeException
getSessionSSL
in class DNotesFactory
host
- URL of server (e.g. "https://plato.acme:8080")user
- user name for authenticationpasswd
- password for for authentication
DNotesRuntimeException
- if the session cannot be createdDNotesFactory.getSessionSSL(java.lang.String, java.lang.String, java.lang.String)
public DSession getSession(java.applet.Applet applet, java.lang.String user, java.lang.String password) throws DNotesRuntimeException
getSession
in class DNotesFactory
applet
- applet instanceuser
- user name for authenticationpassword
- password for for authentication
DNotesRuntimeException
- if the session cannot be createdDNotesFactory.getSession(java.applet.Applet,
java.lang.String, java.lang.String)
public DSession getSessionWithFullAccess() throws DNotesRuntimeException
(Notes client must be installed)
Access restrictions according to readers items are bypassed.
getSessionWithFullAccess
in class DNotesFactory
DNotesRuntimeException
- if the session cannot be createdDNotesFactory.getSessionWithFullAccess()
public DSession getSessionWithFullAccess(java.lang.String password) throws DNotesRuntimeException
(Notes client must be installed)
Access restrictions according to readers items are bypassed.
getSessionWithFullAccess
in class DNotesFactory
password
- password for for authentication
DNotesRuntimeException
- if the session cannot be createdDNotesFactory.getSessionWithFullAccess(java.lang.String)
public void gc()
DNotesFactory
ATTENTION:
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 DNotesFactory
DNotesFactory.gc()
public void disposeInternal(boolean force) throws DNotesRuntimeException
disposeInstance(boolean)
instead
disposeInternal
in class DNotesFactory
force
- indicates if disposal should happen even if still any string
or soft reference exists. if false
, only weak
references must remain.
DNotesRuntimeException
- if an error occurs during disposal or if
not all objects can be disposedDNotesFactory.dispose()
,
DNotesFactory.disposeInternal(boolean)
public void disposeInstance(boolean force) throws DNotesRuntimeException
disposeInstance
in class DNotesFactory
force
- indicates if disposal should happen even if still any
string or soft reference exists. if false
,
only weak references must remain.
DNotesRuntimeException
- if an error occurs during disposal or
if not all objects can be disposedDNotesFactory.disposeInstance(boolean)
public void disposeInstance() throws DNotesRuntimeException
Equivalent to
{link
disposeInstance(false)
disposeInstance
in class DNotesFactory
DNotesRuntimeException
- if an error occurs during disposal or
if not all objects can be disposedDNotesFactory.disposeInstance()
java.lang.Object invoke(java.lang.Object object, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
object
- the object to invoke the method onmethod
- the method to invokeargs
- the arguments for the method
java.lang.Throwable
- if the method cannot be invokedpublic void sinitThread()
DNotesFactory
sinitThread
in class DNotesFactory
DNotesFactory.sinitThread()
public void stermThread()
DNotesFactory
stermThread
in class DNotesFactory
DNotesFactory.stermThread()
public DNotesMonitor getMonitor()
getMonitor
in class DNotesFactory
DNotesFactory.getMonitor()
public void setMonitor(DNotesMonitor theMonitor)
setMonitor
in class DNotesFactory
theMonitor
- the monitorDNotesFactory.setMonitor(de.bea.domingo.DNotesMonitor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |