Interface IConnectionManager

All Known Implementing Classes:
ConnectionManager, ConnectionManager, LinkedConnectionManager

public interface IConnectionManager
This interface may be used to request a connection that is defined in the application configuration. Although the connection objects returned by this manager will offer limited functionality, they may be used to keep services and containers portable between java and .NET.
Since:
6.3
Author:
O. Kerpershoek, M. Naberink
  • Method Details

    • getConnection

      IConnection getConnection(String name)
      This method returns a connection with the specified name.
      Parameters:
      name - The name of the requested connection
      Returns:
      Connection object for the specified name
      Throws:
      UnknownConnectionException - when there is no connection with specified name
    • getSqlConnection

      ISqlConnection getSqlConnection(String name)
      This method returns the SQL connection with the specified name.
      Parameters:
      name - The name of the requested SQL connection.
      Returns:
      Connection object for the specified name.
      Throws:
      UnknownConnectionException - This exception is thrown when no connection was specified for the name.
    • getSoapConnection

      ISoapConnection getSoapConnection(String name)
      Parameters:
      name - The name of the requested SOAP connection.
      Returns:
      Connection object for the specified name.
      Throws:
      UnknownConnectionException - This exception is thrown when no connection was specified for the name.
    • getResourceConnection

      IResourceConnection getResourceConnection(String name)
      This method returns the resource connection with the specified name.
      Parameters:
      name - The name of the requested resource connection.
      Returns:
      Connection object for the specified name.
      Throws:
      UnknownConnectionException - This exception is thrown when no connection was specified for the name.
    • getMailConnection

      IMailConnection getMailConnection(String name)
      This method returns the mail connection with the specified name.
      Parameters:
      name - The name of the requested mail connection.
      Returns:
      Connection object for the specified name.
      Throws:
      UnknownConnectionException - This exception is thrown when no connection was specified for the name.
    • getHttpConnection

      IHttpConnection getHttpConnection(String name)
      Parameters:
      name - The name of the requested http connection.
      Returns:
      Connection object for the specified name.
      Throws:
      UnknownConnectionException - This exception is thrown when no connection was specified for the name.
    • getConnectionNames

      String[] getConnectionNames(ConnectionType type)
      This method returns all the available names for a specified type.
      Parameters:
      type - The connection type, may not be null.
      Returns:
      The connection names, never null.
    • getConnectionNames

      String[] getConnectionNames()
      Returns all available connection names;
      Returns:
      the connection names, never null.
    • hasConnection

      boolean hasConnection(String name, ConnectionType type)
      This method can be used to check if this manager has a connection for the given name and type.
      Parameters:
      name - The name of the connection, may not be null.
      type - The connection type, may not be null.
      Returns:
      True is there is a connection for the given name and type, otherwise false.
    • hasConnection

      boolean hasConnection(String name)
      This method can be used to check whether this manager has a connection for the given name.
      Parameters:
      name - The name of the connection, may not be null.
      Returns:
      True if there is a connection for the given name, otherwise false.