|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwareag.tamino.db.api.connection.TTransactionMode
public abstract class TTransactionMode
TTransactionMode represents a general abstraction for a specific transaction state. A transaction mode needs to be changeable if transaction specific operations are invoked on Tamino. These state changes are implicitly contained either in a TStreamHeader or in the Tamino response document. This class provides all operations needed, so that the concrete TTransactionMode instance can update its state by itself. These operations are abstract and have to be implemented by a concrete transaction state which generally can be either autocommit, local or global TTransactionMode and its concrete subclasses implement the GOF state design pattern. Here each concrete transactions state implements the behaviour needed for a transparent update on the state. Furthermore this class implements the GOF template method design pattern. This is applied for the concrete update methods. All abstract update methods are according this pattern plug in methods. Additionaly this abstract class serves as a basic transaction (no commands).
Constructor Summary | |
---|---|
TTransactionMode(TTransactionModeCoordinator transactionModeCoordinator)
Initializes with the given session mode. |
Method Summary | |
---|---|
abstract void |
begin()
Begin this transaction mode. |
protected abstract void |
doUpdate(TStreamHeader header)
Updates the transaction mode according to the transaction specific content of the stream header. |
abstract void |
end()
End this transaction mode. |
protected TGenericAccessor |
getGenericAccessor()
Gets the generic accessor |
java.util.Locale |
getLocale()
Gets the locale. |
TSessionState |
getSessionState()
Gets the session state. |
protected TTransactionModeCoordinator |
getTransactionModeCoordinator()
Gets the transactional mode coordinator. |
TTransactionParameters |
getTransactionParameters()
Gets the transactional parameters. |
TTransactionTimeoutParameters |
getTransactionTimeoutParameters()
Gets the transaction timeout parameters. |
protected boolean |
isReleased()
Indicates if this TTransaction instance has already been released at its TConnection instance. |
abstract boolean |
needsSessionState(TCommand command)
Test whether the given command statement needs session state updating, i.e. |
protected void |
release()
Releases the concrete transaction. |
void |
setLocale(java.util.Locale locale)
Sets the locale. |
abstract boolean |
supports(TCommand command)
Indicates if the given command is supported within the current transaction mode. |
void |
update(TInputStream inputStream)
Updates the transaction mode according to the transaction specific content of the input stream. |
protected void |
use()
Use the concrete transaction. |
abstract void |
writeTo(TCommandStatement commandStatement)
Writes the current transaction mode to the given commandStatement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TTransactionMode(TTransactionModeCoordinator transactionModeCoordinator)
Method Detail |
---|
public void update(TInputStream inputStream) throws TTransactionModeUpdateException
inputStream
- represents a Tamino response stream containing a Tamino response XML document.
TTransactionModeUpdateException
- if transactions mode cannot be updated.protected abstract void doUpdate(TStreamHeader header) throws TSessionStateUpdateException
header
- is the TStreamHeader of a TInputStream instance.
TSessionStateUpdateException
- in case of a failure.public abstract void writeTo(TCommandStatement commandStatement)
commandStatement
- gets the current transaction mode.public abstract boolean supports(TCommand command)
command
- is checked wheter it can be use with the current transaction mode.
public abstract boolean needsSessionState(TCommand command)
command
- test for this command.
public abstract void begin() throws TAccessorException
TAccessorException
public abstract void end() throws TAccessorException
TAccessorException
protected TTransactionModeCoordinator getTransactionModeCoordinator()
public TTransactionParameters getTransactionParameters()
public TTransactionTimeoutParameters getTransactionTimeoutParameters()
public TSessionState getSessionState()
protected TGenericAccessor getGenericAccessor()
public void setLocale(java.util.Locale locale)
setLocale
in interface TTransaction
public java.util.Locale getLocale()
getLocale
in interface TTransaction
protected void use()
protected void release()
protected boolean isReleased()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |