public abstract class ContextualOperation extends Object
OperationContext
and might take advantage of a
BaseConnection
but might not implement the same base interface. Specifically, those that implement
Operation
vs those that implement ListenOperation
. This isn't really intended to be extended directly
by connector developers. Instead, one of the base classes that use this as a common ancestor should be implemented.BaseOperation
,
BaseListenOperation
Modifier | Constructor and Description |
---|---|
protected |
ContextualOperation(BaseConnection<OperationContext> connection)
Creates a new instance using the required base connection.
|
protected |
ContextualOperation(OperationContext context)
Creates a new instance using the required operation context.
|
Modifier and Type | Method and Description |
---|---|
BaseConnection<OperationContext> |
getConnection()
Returns the base connection that was either provided or created when this instance was created.
|
OperationContext |
getContext()
Returns the OperationContext provided when the operation was constructed.
|
protected ContextualOperation(OperationContext context)
BaseConnection
will be created.protected ContextualOperation(BaseConnection<OperationContext> connection)
public BaseConnection<OperationContext> getConnection()
public OperationContext getContext()