Package de.elo.ix.client.webapp.impl
Class AppConnManagerImpl
java.lang.Object
de.elo.ix.client.webapp.impl.AppConnManagerImpl
- All Implemented Interfaces:
AppConnManager
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.elo.ix.client.webapp.AppConnManager
AppConnManager.UniqueConnectionInitialized
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Application
protected Thread
This thread initializes myConnection.protected Map<String,
IXConnFactory> Maps ELOix URLs to IXConnFactory objects.protected IXConnection
If getConnection is called, this object is returned.protected byps.RemoteException
If this variable is set, the connection cannot be established. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateConnection
(String runAs) Creates a connection to the Indexserver.createConnection
(String computerName, String runAs) Creates a connection to the Indexserver.Creates a connection to the Indexserver.void
done()
Back pointer to the Application object that contains this ConnManager.Returns an IXConnFactory object initialized with the Indexserver URL found in the configuration properties.getConnFactory
(String ixUrl) Returns an IXConnFactory object initialized with the supplied connection parameters.Get the list of events.protected String
getIxUrl()
Gets the unique internally stored Indexserver connection.void
Initialize the unique internally stored Indexserver connection.protected IXConnection
internalCreateConnection
(String ixUrl, String userName, String userPwd, String computerName, String runAs) Creates a connection to the ELOix.void
shutdown()
-
Field Details
-
mapUrlToConnFact
Maps ELOix URLs to IXConnFactory objects. -
myConnection
If getConnection is called, this object is returned. Access this variable only in synchronized(this) blocks. -
initUniqueConnectionThread
This thread initializes myConnection. After the connection was successfully set up, this element is set to null. -
myConnectionError
protected byps.RemoteException myConnectionErrorIf this variable is set, the connection cannot be established. E.g. the ELOix URL is not set. -
application
-
-
Constructor Details
-
AppConnManagerImpl
-
-
Method Details
-
getApplication
Description copied from interface:AppConnManager
Back pointer to the Application object that contains this ConnManager.- Specified by:
getApplication
in interfaceAppConnManager
- Returns:
- Object
-
getConnFactory
Description copied from interface:AppConnManager
Returns an IXConnFactory object initialized with the supplied connection parameters.- Specified by:
getConnFactory
in interfaceAppConnManager
- Parameters:
ixUrl
- Indexserver URL- Returns:
- IXConnFactory object.
- Throws:
byps.RemoteException
- See Also:
-
getConnFactory
Description copied from interface:AppConnManager
Returns an IXConnFactory object initialized with the Indexserver URL found in the configuration properties. The function assumes, that the Indexserver URL can be found under the key getApplication().getAppPropertyNames().getIxUrl().- Specified by:
getConnFactory
in interfaceAppConnManager
- Returns:
- IXConnFactory object
- Throws:
byps.RemoteException
- See Also:
-
createConnection
public IXConnection createConnection(String ixUrl, String userName, String userPwd, String computerName, String runAs) throws byps.RemoteException Description copied from interface:AppConnManager
Creates a connection to the Indexserver.- Specified by:
createConnection
in interfaceAppConnManager
- Parameters:
ixUrl
- Indexserver URLuserName
- User nameuserPwd
- User passwordcomputerName
- Computer name (internally prefixed by the program name)runAs
- Run-As user- Returns:
- IXConnection
- Throws:
byps.RemoteException
-
createConnection
Description copied from interface:AppConnManager
Creates a connection to the Indexserver. The Indexserver URL, the user name and password are taken from the configuration properties.- Specified by:
createConnection
in interfaceAppConnManager
- Parameters:
computerName
- Computer name (internally prefixed by the program name)runAs
- Run-As user- Returns:
- IXConnection
- Throws:
byps.RemoteException
- See Also:
-
createConnection
Description copied from interface:AppConnManager
Creates a connection to the Indexserver. The Indexserver URL, the user name and password are taken from the configuration properties. The computer name is queried by java runtime functions.- Specified by:
createConnection
in interfaceAppConnManager
- Parameters:
runAs
- Run-As user- Returns:
- IXConnection
- Throws:
byps.RemoteException
-
getUniqueConnection
Description copied from interface:AppConnManager
Gets the unique internally stored Indexserver connection. Call this function, if the application does only need one connection to the Indexserver. (The IXConnection class is thread-save). This method should not be invoked in a Servlet.init method.- Specified by:
getUniqueConnection
in interfaceAppConnManager
- Returns:
- IXConnection object
- Throws:
byps.RemoteException
- thrown on timeoutInterruptedException
- See Also:
-
initUniqueConnection
public void initUniqueConnection()Description copied from interface:AppConnManager
Initialize the unique internally stored Indexserver connection. Call this function, if the application does only need one connection to the Indexserver. (The IXConnection class is thread-save). The Indexserver URL, the user name and password are taken from the configuration properties. This method should be invoked in a Servlet.init method. It initializes the connection in a background thread and returns immediately.- Specified by:
initUniqueConnection
in interfaceAppConnManager
- See Also:
-
shutdown
public void shutdown()- Specified by:
shutdown
in interfaceAppConnManager
-
getEvents
Description copied from interface:AppConnManager
Get the list of events. In order to listen for events, add an object that implements the event interfaces.- Specified by:
getEvents
in interfaceAppConnManager
- Returns:
- List
-
done
public void done() -
internalCreateConnection
protected IXConnection internalCreateConnection(String ixUrl, String userName, String userPwd, String computerName, String runAs) throws byps.RemoteException, de.elo.ix.client.webapp.impl.AppConnManagerImpl.RetryException Creates a connection to the ELOix.- Parameters:
ixUrl
- ELOix URLuserName
- User nameuserPwd
- User passwordcomputerName
- Computer name (internally prefixed by the program name)runAs
- Run-As user- Returns:
- IXConnection
- Throws:
byps.RemoteException
de.elo.ix.client.webapp.impl.AppConnManagerImpl.RetryException
-
getIxUrl
-