|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.bea.domingo.DNotesFactory
public abstract class DNotesFactory
Main entry point for applications to the domingo-API.
Stand-alond client applications shall call the methos getInstance()
method to obtain a singleton instance of the DSession
interface.
Domingo takes care of proper disposual of this singleton session instance.
Server based applications must call the newInstance(String)
method
to obtain a new instance of the
Once an application has obtained a reference to a
DNotesFactory
it can use the factory to obtain a Notes
session.
Constructor Summary | |
---|---|
protected |
DNotesFactory()
Protected Constructor to restrict creation to sub classes. |
Method Summary | |
---|---|
static void |
dispose()
Disposes the singleton instance of the factory. |
static void |
dispose(boolean force)
Disposes the singleton instance of the factory. |
abstract void |
disposeInstance()
Disposes all internal resources of the Notes connection. |
abstract void |
disposeInstance(boolean force)
Disposes all internal resources of the Notes connection. |
abstract void |
disposeInternal(boolean force)
Deprecated. use disposeInstance(boolean) instead |
protected abstract void |
gc()
Deprecated. only use this method for testing |
static boolean |
getBooleanProperty(java.lang.String key,
boolean defaultValue)
Returns the integer value of a property or returns the given default value if no configuration found or if the value cannot be converted to an integer value. |
static DNotesFactory |
getInstance()
Returns a singleton instance of class DNotesFactory. |
static DNotesFactory |
getInstance(DNotesMonitor theMonitor)
Returns a singleton instance of class DNotesFactory. |
static DNotesFactory |
getInstance(java.lang.String implementingClassName)
Returns a singleton instance of class DNotesFactory. |
static DNotesFactory |
getInstance(java.lang.String implementingClassName,
DNotesMonitor theMonitor)
Returns a singleton instance of class DNotesFactory. |
static int |
getIntProperty(java.lang.String key,
int defaultValue)
Returns the integer value of a property or returns the given default value if no configuration found or if the value cannot be converted to an integer value. |
protected abstract DNotesMonitor |
getMonitor()
Get the current monitor. |
static java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Returns the value of a property or returns the given default value if no configuration found. |
abstract DSession |
getSession()
Creates a local session. |
abstract DSession |
getSession(java.applet.Applet applet,
java.lang.String user,
java.lang.String password)
Creates a remote (IIOP) session for an applet. |
abstract DSession |
getSession(java.lang.Object notesSession)
Creates a Domingo session for an existing Notes session. |
abstract DSession |
getSession(java.lang.String serverUrl)
Creates a DIIOP session. |
abstract DSession |
getSession(java.lang.String serverUrl,
java.lang.String[] args,
java.lang.String user,
java.lang.String password)
Creates a remote (IIOP or Http) session with arguments using host name. |
abstract DSession |
getSession(java.lang.String serverUrl,
java.lang.String user,
java.lang.String password)
Creates a remote (IIOP or Http) session using host name. |
abstract DSession |
getSessionSSL(java.lang.String serverUrl,
java.lang.String user,
java.lang.String password)
Creates a remote (IIOP or Http) session with SSL using host name. |
abstract DSession |
getSessionWithFullAccess()
Creates a local session. |
abstract DSession |
getSessionWithFullAccess(java.lang.String password)
Creates a local session. |
static DNotesFactory |
newInstance()
Returns a new instance of class DNotesFactory. |
static DNotesFactory |
newInstance(DNotesMonitor theMonitor)
Returns a new instance of class DNotesFactory. |
static DNotesFactory |
newInstance(java.lang.String implementingClassName)
Returns a new instance of class DNotesFactory. |
static DNotesFactory |
newInstance(java.lang.String implementingClassName,
DNotesMonitor theMonitor)
Returns a new instance of class DNotesFactory. |
protected abstract void |
setMonitor(DNotesMonitor theMonitor)
Set the monitor. |
static void |
setProperty(java.lang.String key,
java.lang.String value)
Sets a configuration value and overwrites any default or configuration settings. |
abstract void |
sinitThread()
Enables Notes access for the current thread. |
abstract void |
stermThread()
Disables Notes access for the current thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DNotesFactory()
Method Detail |
---|
public static DNotesFactory getInstance() throws DNotesRuntimeException
This method uses the following ordered lookup procedure to determine
the DNotesFactory
implementation class to load:
de.bea.domingo.factory
system property.de/bea/domingo/domingo.properties
This configuration file must be in standard
java.util.Properties
format and contains the fully qualified
name of the implementation class with the key being the system property
defined above.NotesProxyFactory
.
DNotesRuntimeException
- if the instance cannot be createdpublic static DNotesFactory getInstance(java.lang.String implementingClassName) throws DNotesRuntimeException
implementingClassName
- class name of implementation to use
DNotesRuntimeException
- if the instance cannot be createdpublic static DNotesFactory getInstance(java.lang.String implementingClassName, DNotesMonitor theMonitor) throws DNotesRuntimeException
implementingClassName
- class name of implementation to usetheMonitor
- the monitor
DNotesRuntimeException
- if the instance cannot be createdpublic static DNotesFactory getInstance(DNotesMonitor theMonitor) throws DNotesRuntimeException
This method uses the following ordered lookup procedure to determine
the DNotesFactory
implementation class to load:
de.bea.domingo.factory
system property.java.util.Properties
format and contains the fully qualified
name of the implementation class with the key being the system property
defined above.NotesProxyFactory
.
theMonitor
- the monitor
DNotesRuntimeException
- if the instance cannot be createdpublic static DNotesFactory newInstance() throws DNotesRuntimeException
It is up to the user to remember this instance and to keep it as a singleton if needed.
By default the implementing class is NotesProxyFactory
.
DNotesRuntimeException
- if the instance cannot be createdpublic static DNotesFactory newInstance(DNotesMonitor theMonitor) throws DNotesRuntimeException
It is up to the user to remember this instance and to keep it as a singleton if needed.
By default the implementing class is NotesProxyFactory
.
theMonitor
- the monitor
DNotesRuntimeException
- if the instance cannot be createdpublic static DNotesFactory newInstance(java.lang.String implementingClassName, DNotesMonitor theMonitor) throws DNotesRuntimeException
It is up to the user to remember this instance and to keep it as a singleton if needed.
implementingClassName
- class name of implementation to usetheMonitor
- the monitor
DNotesRuntimeException
- if the instance cannot be createdpublic static DNotesFactory newInstance(java.lang.String implementingClassName) throws DNotesRuntimeException
It is up to the user to remember this instance and to keep it as a singleton if needed.
implementingClassName
- class name of implementation to use
DNotesRuntimeException
- if the instance cannot be createdpublic abstract DSession getSession() throws DNotesRuntimeException
(Notes client must be installed)
DNotesRuntimeException
- if the session cannot be createdpublic abstract DSession getSession(java.lang.String serverUrl) throws DNotesRuntimeException
serverUrl
- URL of server (e.g. "https://plato.acme:8080")
DNotesRuntimeException
- if the session cannot be createdpublic abstract DSession getSession(java.lang.String serverUrl, java.lang.String user, java.lang.String password) throws DNotesRuntimeException
serverUrl
- URL of server (e.g. "https://plato.acme:8080")user
- user name for authenticationpassword
- password for for authentication
DNotesRuntimeException
- if the session cannot be createdpublic abstract DSession getSessionSSL(java.lang.String serverUrl, java.lang.String user, java.lang.String password) throws DNotesRuntimeException
serverUrl
- URL of server (e.g. "https://plato.acme:8080")user
- user name for authenticationpassword
- password for for authentication
DNotesRuntimeException
- if the session cannot be createdpublic abstract DSession getSession(java.lang.String serverUrl, java.lang.String[] args, java.lang.String user, java.lang.String password) throws DNotesRuntimeException
serverUrl
- URL of server (e.g. "https://plato.acme:8080")args
- array of additional argumentsuser
- user name for authenticationpassword
- password for for authentication
DNotesRuntimeException
- if the session cannot be createdpublic abstract DSession getSession(java.applet.Applet applet, java.lang.String user, java.lang.String password) throws DNotesRuntimeException
applet
- applet instanceuser
- user name for authenticationpassword
- password for for authentication
DNotesRuntimeException
- if the session cannot be createdpublic abstract DSession getSession(java.lang.Object notesSession) throws DNotesRuntimeException
This method is used only internally in Notes agents and Notes applets.
notesSession
- existing Notes session
DNotesRuntimeException
- if the session cannot be createdpublic abstract DSession getSessionWithFullAccess() throws DNotesRuntimeException
(Notes client must be installed)
Access restrictions according to readers items are bypassed.
DNotesRuntimeException
- if the session cannot be createdpublic abstract DSession getSessionWithFullAccess(java.lang.String password) throws DNotesRuntimeException
(Notes client must be installed)
Access restrictions according to readers items are bypassed.
password
- password for for authentication
DNotesRuntimeException
- if the session cannot be createdpublic static final java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
key
- the key of the propertydefaultValue
- default value, if no configuration found
public static void setProperty(java.lang.String key, java.lang.String value)
key
- the key of the propertyvalue
- the new valuepublic static final int getIntProperty(java.lang.String key, int defaultValue)
key
- the key of the propertydefaultValue
- default value, if no configuration found
public static final boolean getBooleanProperty(java.lang.String key, boolean defaultValue)
key
- the key of the propertydefaultValue
- default value, if no configuration found
public abstract void sinitThread()
public abstract void stermThread()
protected abstract void gc()
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.
Runtime.gc()
public static void dispose() throws DNotesRuntimeException
It is strictly recommended to call this method before exiting applications in order to not destabilize the Lotus Notes Client.
If a factory was created with a
newInstance(String, DNotesMonitor)
method, the factory must be
disposed with the instance method disposeInstance(boolean)
.
Equivalent to
{link
disposeInstance(true)
DNotesRuntimeException
- if an error occurs during disposal or
if not all objects can be disposedpublic static void dispose(boolean force) throws DNotesException
It is strictly recommended to call this method before exiting applications in order to not destabilize the Lotus Notes Client.
If a factory was created with a
newInstance(String, DNotesMonitor)
method, the factory must be
disposed with the instance method disposeInstance(boolean)
.
force
- indicates if disposal should happen even if still any
string or soft reference exists. if false
,
only weak references must remain.
DNotesException
- if an error occurs during disposal or
if not all objects can be disposedpublic abstract void disposeInternal(boolean force) throws DNotesRuntimeException
disposeInstance(boolean)
instead
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 disposedpublic abstract void disposeInstance(boolean force) throws DNotesRuntimeException
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 disposedpublic abstract void disposeInstance() throws DNotesRuntimeException
Equivalent to
{link
disposeInstance(false)
DNotesRuntimeException
- if an error occurs during disposal or
if not all objects can be disposedprotected abstract DNotesMonitor getMonitor()
protected abstract void setMonitor(DNotesMonitor theMonitor)
theMonitor
- the monitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |