public abstract class TAbstractInvocation extends java.lang.Object implements TInvocation, TRetryInvocation
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_RETRY |
Constructor and Description |
---|
TAbstractInvocation(TUri databaseUri)
Initializes the invocation with the given database uri.
|
TAbstractInvocation(TUri databaseUri,
SecurityToken token) |
TAbstractInvocation(TUri databaseUri,
java.lang.String userId,
java.lang.String password)
Initializes the invocation with the given database uri, userId and password.
|
TAbstractInvocation(TUri databaseUri,
java.lang.String domain,
java.lang.String userId,
java.lang.String password)
Initializes the invocation with the given database uri, domain, userId and password.
|
Modifier and Type | Method and Description |
---|---|
void |
addRetryHandler(TInvocationRetryHandler retryHandler)
Add a retry handler on this invocation.
|
void |
checkServerAvailabilityAndVersion()
Check if there is an available Tamino database server and what version does it have?
If the server is available and responses adequate this method returns null.
|
void |
close()
Closes the invocation capability on Tamino.
|
protected abstract void |
doClose()
Plug in method for closing the invocation connection.
|
abstract TInputStream |
doInvoke(TCommandStatement commandStatement,
java.lang.String collection,
java.lang.String doctype,
java.lang.String docname,
boolean useTransactionState)
Invokes a Tamino specific command given by a TCommandStatement on an underlying Tamino database.
|
TUri |
getDatabaseUri()
Gets the database uri of this invocation.
|
protected java.lang.String |
getDomain()
Gets the domain that is currently set for the authentication.
|
TCommandStatement |
getLastExecutedCommandStatement()
Gets the last executed command statement!
|
long |
getLastNonActivityTimeoutRelevantInvokeTimeMillis()
Gets the time of the last session relevant invoke.
|
java.util.Locale |
getLocale()
Gets the locale.
|
protected java.lang.String |
getPassword()
Gets the password that is currently set for the authentication.
|
TPooledConnectionReconnectHandler |
getPooledConnectionReconnectHandler()
Gets the handler for automatic reconnects of pooled connections
|
protected SecurityToken |
getSecurityToken()
Gets the SecurityToken that is currently set for the authentication.
|
TTransactionModeCoordinator |
getTransactionModeCoordinator()
Gets the current transaction mode coordinator.
|
protected java.lang.String |
getUserId()
Gets the userId that is currently set for the authentication.
|
TInputStream |
invoke(TCommandStatement commandStatement)
Invokes a specific command given by a TCommandStatement on an underlying Tamino database.
|
TInputStream |
invoke(TCommandStatement commandStatement,
java.lang.String collection)
Invokes a specific command given by a TCommandStatement on an underlying Tamino database.
|
TInputStream |
invoke(TCommandStatement commandStatement,
java.lang.String collection,
java.lang.String doctype,
java.lang.String docname)
Invokes a specific command given by a TCommandStatement on an underlying Tamino database.
|
boolean |
isClosed()
Indicates if the invocation is closed.
|
void |
setLocale(java.util.Locale locale)
Sets the locale.
|
void |
setPooledConnectionReconnectHandler(TPooledConnectionReconnectHandler handler)
Sets the handler for automatic reconnects of pooled connections
|
void |
setTransactionModeCoordinator(TTransactionModeCoordinator transactionModeCoordinator)
Sets a TTransactionModeCoordinator on the instance.
|
boolean |
supports(TCommand command)
Indicates if the given command is supported for invocation in the current state.
|
protected void |
updateStreamHeader(TInputStream inputStream,
java.lang.String collection,
java.lang.String doctype)
Update the streams header, so that the information for collection, doctype and more is included.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSocketTimeout, setSocketTimeout
public static final java.lang.String PROP_RETRY
public TAbstractInvocation(TUri databaseUri, SecurityToken token)
public TAbstractInvocation(TUri databaseUri) throws TInvocationException
TInvocationException
public TAbstractInvocation(TUri databaseUri, java.lang.String userId, java.lang.String password) throws TInvocationException
TInvocationException
public TAbstractInvocation(TUri databaseUri, java.lang.String domain, java.lang.String userId, java.lang.String password) throws TInvocationException
TInvocationException
public TInputStream invoke(TCommandStatement commandStatement) throws TInvocationException
invoke
in interface TInvocation
commandStatement
- spcifies the concrete XML specific action that should be fullfilled.TInvocationException
- due to any problems that can occur when performing the
invocation on Tamino.public TInputStream invoke(TCommandStatement commandStatement, java.lang.String collection) throws TInvocationException
invoke
in interface TInvocation
commandStatement
- spcifies the concrete action that should be fullfilled.collection
- is the collection of the Tamino DB where the object is contained in.TInvocationException
- due to any problems that can occur when performing the
invocation on Tamino.public TInputStream invoke(TCommandStatement commandStatement, java.lang.String collection, java.lang.String doctype, java.lang.String docname) throws TInvocationException
invoke
in interface TInvocation
commandStatement
- spcifies the concrete action that should be fullfilled.collection
- is the collection of the Tamino DB where the object is contained in.doctype
- within a schema of a collection to which the statement is related.docname
- denotes the docname under which a specific document might be accessible.TInvocationException
- due to any problems that can occur when performing the
invocation on Tamino.public boolean supports(TCommand command)
supports
in interface TInvocation
command
- is checked wheter it can be invoked the current state of the TInvocation instance.public void setTransactionModeCoordinator(TTransactionModeCoordinator transactionModeCoordinator)
setTransactionModeCoordinator
in interface TInvocation
TTransactionModeCoordinator
- needed to update session state for session specific operations.public void setLocale(java.util.Locale locale)
setLocale
in interface TInvocation
public java.util.Locale getLocale()
getLocale
in interface TInvocation
public void close() throws TInvocationException
close
in interface TInvocation
TInvocationException
- due to any problems that can occur when performing the
invocation on Tamino.public boolean isClosed()
isClosed
in interface TInvocation
protected java.lang.String getUserId()
protected java.lang.String getPassword()
protected java.lang.String getDomain()
protected SecurityToken getSecurityToken()
public void checkServerAvailabilityAndVersion() throws TCommunicationException
TCommunicationException
public TUri getDatabaseUri()
getDatabaseUri
in interface TInvocation
public abstract TInputStream doInvoke(TCommandStatement commandStatement, java.lang.String collection, java.lang.String doctype, java.lang.String docname, boolean useTransactionState) throws TInvocationException
doInvoke
in interface TRetryInvocation
commandStatement
- spcifies the concrete Tamino specific action that should be fullfilled.collection
- is the collection of the Tamino DB to which the command statement might be related to.doctype
- within a schema of the given collection to which the command statement might be related to.docname
- is the name of the document to which the command statement might be related to.useTransactionState
- specifies whether the transaction state shall be considered.TInvocationException
- due to any problems that can occur when performing the
invocation on Tamino.protected abstract void doClose() throws TInvocationException
TInvocationException
public TTransactionModeCoordinator getTransactionModeCoordinator()
getTransactionModeCoordinator
in interface TRetryInvocation
public TCommandStatement getLastExecutedCommandStatement()
getLastExecutedCommandStatement
in interface TInvocation
public void addRetryHandler(TInvocationRetryHandler retryHandler)
commandStatement
- specifies the concrete Tamino specific action that should be fullfilled.
Session information is written to the command statement.public long getLastNonActivityTimeoutRelevantInvokeTimeMillis()
getLastNonActivityTimeoutRelevantInvokeTimeMillis
in interface TInvocation
public void setPooledConnectionReconnectHandler(TPooledConnectionReconnectHandler handler)
setPooledConnectionReconnectHandler
in interface TInvocation
public TPooledConnectionReconnectHandler getPooledConnectionReconnectHandler()
getPooledConnectionReconnectHandler
in interface TInvocation
protected void updateStreamHeader(TInputStream inputStream, java.lang.String collection, java.lang.String doctype)
Copyright (c) 2017 Software AG. All Rights Reserved.