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 Summary
Modifier and TypeMethodDescriptiongetConnection
(String name) This method returns a connection with the specified name.String[]
Returns all available connection names;String[]
This method returns all the available names for a specified type.getHttpConnection
(String name) getMailConnection
(String name) This method returns the mail connection with the specified name.getResourceConnection
(String name) This method returns the resource connection with the specified name.getSoapConnection
(String name) getSqlConnection
(String name) This method returns the SQL connection with the specified name.boolean
hasConnection
(String name) This method can be used to check whether this manager has a connection for the given name.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.
-
Method Details
-
getConnection
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
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
- 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
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
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
- 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
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
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
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.
-