com.softwareag.tamino.db.api.invocation
Class TInvocationRetryOnConnectionTimeoutHandler
java.lang.Object
com.softwareag.tamino.db.api.invocation.TAbstractInvocationRetryHandler
com.softwareag.tamino.db.api.invocation.TInvocationRetryOnConnectionTimeoutHandler
- All Implemented Interfaces:
- TInvocationRetryHandler
public class TInvocationRetryOnConnectionTimeoutHandler
- extends TAbstractInvocationRetryHandler
The TInvocationRetryOnConnectionTimeoutHandler is a TInvocationRetryHandler which tries
to re-establish a connection to a Tamino server after the Tamino server timed out the
session. It attempts to establish the connection once.
- Version:
- $Revision: 1.10 $
- Author:
- Martin Meijsen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TInvocationRetryOnConnectionTimeoutHandler
public TInvocationRetryOnConnectionTimeoutHandler()
prepare
public void prepare(TRetryInvocation invocation,
TCommandStatement commandStatement,
java.lang.String collection,
java.lang.String doctype,
java.lang.String docname,
boolean useTransactionMode)
- Prepare an invocation.
This method is called at the very first time within the invocation where no processing has been done.
Here some kind of preparation/initialization of the handler can be done.
- Specified by:
prepare
in interface TInvocationRetryHandler
- Overrides:
prepare
in class TAbstractInvocationRetryHandler
- Parameters:
invocation
- spcifies the invocation.commandStatement
- specifies the concrete Tamino specific action that should be fulfilled.
Session information is not yet set.collection
- is the collection of the Tamino DB associated to the command.doctype
- within a schema of the given collection associated to the command.docname
- is the name of the document associated to the command.useTransactionState
- specifies whether the transaction state shall be considered.
retryAfterSessionModeUpdate
public TInputStream retryAfterSessionModeUpdate(TRetryInvocation invocation,
TCommandStatement commandStatement,
TInputStream inputStream,
TTransactionModeUpdateException cause)
- Handle the "result" after the invocation has been updated or tried to update the session information from the command statment.
- Specified by:
retryAfterSessionModeUpdate
in interface TInvocationRetryHandler
- Overrides:
retryAfterSessionModeUpdate
in class TAbstractInvocationRetryHandler
- Parameters:
invocation
- spcifies the invocation.commandStatement
- specifies the Tamino command that was issued.
Session information as returned by the previous Tamino command is set.inputStream
- the returned input stream from the base communicationcause
- the exception caused by writing the session information or null, when it has been successful.
- Returns:
- TInputStream with the successful retry result or null otherwise.
wrapUpAfterSessionModeUpdate
public void wrapUpAfterSessionModeUpdate(TRetryInvocation invocation,
TCommandStatement commandStatement)
- Wrap up an invocation.
This method is called at the very end of the invocation where all processing has been done.
Here some memorization of state information can be done that can be used in the next invocation of the handler.
- Specified by:
wrapUpAfterSessionModeUpdate
in interface TInvocationRetryHandler
- Overrides:
wrapUpAfterSessionModeUpdate
in class TAbstractInvocationRetryHandler
- Parameters:
invocation
- specifies the invocation.commandStatement
- specifies the Tamino command that was issued.
Session information as returned by the previous Tamino command is set.
Copyright (c) 2013 Software AG. All Rights Reserved.