Package com.boomi.connector.util
Class BaseConnection<C extends ConnectorContext>
- java.lang.Object
-
- com.boomi.connector.util.BaseConnection<C>
-
- Direct Known Subclasses:
RestConnection
,SimpleManagerConnection
,SimplePollingManagerConnection
,SimplePollingOperationConnection
,WSConnection
public class BaseConnection<C extends ConnectorContext> extends Object
The BaseConnection class is used to implement behavior which is common across all types of interactions with the target service (i.e. behavior which is common to all of the browse/operation implementations). This class has a handle to the current Browse/OperationContext and can therefore maintain data which is account specific. This class does not need to be thread-safe as it is only used for a single browse/operation.
-
-
Constructor Summary
Constructors Constructor Description BaseConnection(C context)
Creates a new instance using the specified context.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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 connectionOperationContext
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).
-
-
-
Constructor Detail
-
BaseConnection
public BaseConnection(C context)
Creates a new instance using the specified context. The context is required.
-
-
Method Detail
-
getContext
public C getContext()
Returns the context used to create this connection- Returns:
- the context
-
getOperationContext
@Deprecated public 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). ThegetContext()
method can now be used to access an operation context in a type safe way.Returns the operation context for this connection.- Returns:
- the operation context
-
getConnector
public Connector getConnector()
Returns the connector instance with which this context is associated.- Returns:
- the connector
-
generateConnectionInfo
public String generateConnectionInfo()
Returns the connection information used for logging.The default implementation returns null. Subclasses may wish to override this implementation to return specific connection information that will be used for logging purposes.
-
-