### *** This interface provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.connection

# Interface ConnectionFactoryShellInterface

All Known Subinterfaces:
  `ConnectionFactoryInterface`, `PlatformConnectionFactoryInterface`

@SASScope("ALL") @BinaryCompatibilityOnly public interface ConnectionFactoryShellInterface
Methods common to all connection factory interfaces.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addConnectionFactoryEventListener(ConnectionFactoryEventListener listener)`
  Add a listener for connection factory events.
  `ConnectionFactoryAdminInterface`
  `getAdminInterface(Credential adminLogin)`
  Get the factory administrator's interface.
  `ConnectionInterface`
  `getConnection(Credential login)`
  Get a connection to a server.
  `ConnectionInterface`
  `getConnection(Credential login, long waitMilliseconds)`
  Get a connection to a server.
  `List`
  `getDomains()`
  Get the list of authentication domains supported by this factory.
  `void`
  `removeConnectionFactoryEventListener(ConnectionFactoryEventListener listener)`
  Remove a listener for connection factory events.

- ## Method Details

  - ### addConnectionFactoryEventListener

    void addConnectionFactoryEventListener(ConnectionFactoryEventListener listener)
    Add a listener for connection factory events.
    Parameters:
      `listener` - a listener for connection factory events

  - ### removeConnectionFactoryEventListener

    void removeConnectionFactoryEventListener(ConnectionFactoryEventListener listener)
    Remove a listener for connection factory events.
    Parameters:
      `listener` - a listener for connection factory events

  - ### getDomains

    List getDomains()
    Get the list of authentication domains supported by this factory. The domains are listed in order of increasing estimated time to connect.
    Returns:
      the list of authentication domains supported by this factory

  - ### getConnection

    ConnectionInterface getConnection(Credential login) throws ConnectionFactoryException
    Get a connection to a server. If the factory has allocated all the connections it is allowed to manage to users when this call is made, then this call will block until another user returns a connection to the factory's pool.
    Parameters:
      `login` - credentials for someone allowed to use this factory
    Returns:
      a connection
    Throws:
      `ConnectionFactoryException` - if the factory cannot create a connection to satisfy this request or if the request times out or if the factory has been shutdown

  - ### getConnection

    ConnectionInterface getConnection(Credential login, long waitMilliseconds) throws ConnectionFactoryException
    Get a connection to a server. If the factory has allocated all the connections it is allowed to manage to users when this call is made, then this call will behave as instructed by the value of waitMilliseconds.
    Parameters:
      `login` - credentials for someone allowed to use this factory
      `waitMilliseconds` - a flag indicating how the call should behave if the factory has allocated all the connections it is allowed to manage to other users.

      `<0`
        throw an exception immediately
      `0`
        wait until another user returns a connection to the factory's pool
      `>0`
        wait up to waitMilliseconds milliseconds for another user to return a connection to the factory's pool and throw an exception if a connection is not returned in the alloted time.
      Returns:
        a connection
      Throws:
        `ConnectionFactoryException` - if the factory cannot create a connection to satisfy this request or if the request times out or if the factory has been shutdown

  - ### getAdminInterface

    ConnectionFactoryAdminInterface getAdminInterface(Credential adminLogin) throws ConnectionFactoryException
    Get the factory administrator's interface. The administrator's interface allows you to manipulate factory logging and to shutdown or destroy the factory. Actions performed on the administrator's interface may impact other users of this factory.
    Parameters:
      `login` - credentials for someone allowed to administer this factory or `null`
    Returns:
      the factory administrator's interface
    Throws:
      `ConnectionFactoryException`