public class BaseConnection<C extends ConnectorContext> extends Object
Constructor and Description |
---|
BaseConnection(C context)
Creates a new instance using the specified context.
|
Modifier and Type | Method and Description |
---|---|
String |
generateConnectionInfo()
Returns the connection information used for logging.
|
protected String |
generateConnectionInfo(String user,
String url) |
Connector |
getConnector()
Returns the connector instance with which this context is associated.
|
C |
getContext()
Returns the context used to create this connection
|
OperationContext |
getOperationContext()
Deprecated.
This has been deprecated due to inherent type safety concerns since instances can be created with any
context (not necessarily an operation context). The
getContext() method can now be used to
access an operation context in a type safe way. |
public BaseConnection(C context)
public C getContext()
@Deprecated public OperationContext getOperationContext()
getContext()
method can now be used to
access an operation context in a type safe way.public Connector getConnector()
public String generateConnectionInfo()
The default implementation returns null. Subclasses may wish to override this implementation to return specific connection information that will be used for logging purposes.