Class AppConnManagerImpl

java.lang.Object
de.elo.ix.client.webapp.impl.AppConnManagerImpl
All Implemented Interfaces:
AppConnManager

public class AppConnManagerImpl extends Object implements AppConnManager
  • Field Details

    • mapUrlToConnFact

      protected Map<String,IXConnFactory> mapUrlToConnFact
      Maps ELOix URLs to IXConnFactory objects.
    • myConnection

      protected IXConnection myConnection
      If getConnection is called, this object is returned. Access this variable only in synchronized(this) blocks.
    • initUniqueConnectionThread

      protected Thread initUniqueConnectionThread
      This thread initializes myConnection. After the connection was successfully set up, this element is set to null.
    • myConnectionError

      protected byps.RemoteException myConnectionError
      If this variable is set, the connection cannot be established. E.g. the ELOix URL is not set.
    • application

      protected Application application
  • Constructor Details

    • AppConnManagerImpl

      public AppConnManagerImpl(Application app)
  • Method Details

    • getApplication

      public Application getApplication()
      Description copied from interface: AppConnManager
      Back pointer to the Application object that contains this ConnManager.
      Specified by:
      getApplication in interface AppConnManager
      Returns:
      Object
    • getConnFactory

      public IXConnFactory getConnFactory(String ixUrl) throws byps.RemoteException
      Description copied from interface: AppConnManager
      Returns an IXConnFactory object initialized with the supplied connection parameters.
      Specified by:
      getConnFactory in interface AppConnManager
      Parameters:
      ixUrl - Indexserver URL
      Returns:
      IXConnFactory object.
      Throws:
      byps.RemoteException
      See Also:
    • getConnFactory

      public IXConnFactory getConnFactory() throws byps.RemoteException
      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 interface AppConnManager
      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 interface AppConnManager
      Parameters:
      ixUrl - Indexserver URL
      userName - User name
      userPwd - User password
      computerName - Computer name (internally prefixed by the program name)
      runAs - Run-As user
      Returns:
      IXConnection
      Throws:
      byps.RemoteException
    • createConnection

      public IXConnection createConnection(String computerName, String runAs) throws byps.RemoteException
      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 interface AppConnManager
      Parameters:
      computerName - Computer name (internally prefixed by the program name)
      runAs - Run-As user
      Returns:
      IXConnection
      Throws:
      byps.RemoteException
      See Also:
    • createConnection

      public IXConnection createConnection(String runAs) throws byps.RemoteException
      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 interface AppConnManager
      Parameters:
      runAs - Run-As user
      Returns:
      IXConnection
      Throws:
      byps.RemoteException
    • getUniqueConnection

      public IXConnection getUniqueConnection() throws byps.RemoteException, InterruptedException
      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 interface AppConnManager
      Returns:
      IXConnection object
      Throws:
      byps.RemoteException - thrown on timeout
      InterruptedException
      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 interface AppConnManager
      See Also:
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface AppConnManager
    • getEvents

      public List<AppEvent> 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 interface AppConnManager
      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 URL
      userName - User name
      userPwd - User password
      computerName - 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

      protected String getIxUrl()