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

Interface PlatformConnectionFactoryInterface

All Superinterfaces:
ConnectionFactoryInterface, ConnectionFactoryShellInterface

@SASScope("ALL") @BinaryCompatibilityOnly public interface PlatformConnectionFactoryInterface extends ConnectionFactoryInterface
A specialization of the user interface for connection factories. This interface allows users to obtain connections from a connection factory using the Foundation User Service to identity the user requesting the connection.
  • Method Details

    • getConnection

      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:
      userContext - the context of 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 factory has been shutdown
    • getConnection

      ConnectionInterface getConnection(UserContextInterface userContext, 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:
      userContext - the context of 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