org.caleigo.core
Class TunneledDataService.TunneledDataTransaction

java.lang.Object
  extended byorg.caleigo.core.AbstractDataService.AbstractDataTransaction
      extended byorg.caleigo.core.TunneledDataService.TunneledDataTransaction
All Implemented Interfaces:
IDataTransaction, IDistributable, IMessageConsumer, java.io.Serializable
Enclosing class:
TunneledDataService

protected static class TunneledDataService.TunneledDataTransaction
extends AbstractDataService.AbstractDataTransaction
implements IMessageConsumer

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.caleigo.core.AbstractDataService.AbstractDataTransaction
AbstractDataService.AbstractDataTransaction.DataOperation
 
Nested classes inherited from class org.caleigo.core.IDataTransaction
IDataTransaction.IProgressListener, IDataTransaction.Job, IDataTransaction.ProgressAdapter, IDataTransaction.ProgressEvent
 
Field Summary
protected  java.lang.Object mServiceIdentity
           
protected  java.lang.Class mServiceInterfaceClass
           
protected  java.lang.Object mServiceType
           
protected  ITunnel mTunnel
           
 
Fields inherited from class org.caleigo.core.AbstractDataService.AbstractDataTransaction
mJob
 
Constructor Summary
TunneledDataService.TunneledDataTransaction(int timeout, java.lang.Class serviceInterfaceClass, java.lang.Object serviceType, java.lang.Object serviceIdentity, ITunnel tunnel)
           
 
Method Summary
 void abortTransaction()
          Tries to abort the currently executing transaction.
 boolean acceptsMessage(java.lang.Object message)
          Returns true if this IMessageConsumer accepts the message.
 java.lang.Object answerMessage(java.lang.Object message)
          Tells the IMessageConsumer to consume a message and returns a new message that will be delivered to the sender of the originial message.
 void commit()
          Commit performs all the stored operations in the transaction.
 void consumeMessage(java.lang.Object message)
          Tells the IMessageConsumer to consume a message.
protected  void copyEntity(IEntity sourceEntity, IEntity targetEntity)
           
protected  void copyEntityStatusFlags(IEntity sourceEntity, IEntity targetEntity)
           
protected  void copyTransactionData(AbstractDataService.AbstractDataTransaction.DataOperation[] sourceDataOperations)
           
 
Methods inherited from class org.caleigo.core.AbstractDataService.AbstractDataTransaction
addCreate, addDelete, addLoad, addLoadSelection, addLoadSelection, addLoadSelection, addOperation, addRefresh, addRelation, addStore, commitAsynchroniesly, getID, getJob, getNbrOfOperations, getOperations, isEmpty, isMutating, updateProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mServiceInterfaceClass

protected java.lang.Class mServiceInterfaceClass

mServiceType

protected java.lang.Object mServiceType

mServiceIdentity

protected java.lang.Object mServiceIdentity

mTunnel

protected transient ITunnel mTunnel
Constructor Detail

TunneledDataService.TunneledDataTransaction

public TunneledDataService.TunneledDataTransaction(int timeout,
                                                   java.lang.Class serviceInterfaceClass,
                                                   java.lang.Object serviceType,
                                                   java.lang.Object serviceIdentity,
                                                   ITunnel tunnel)
Method Detail

commit

public void commit()
            throws DataServiceException
Commit performs all the stored operations in the transaction. If any of the operations fail a rollback on all operations will be automatically performed and a TransactionFailedException will be thrown.

Specified by:
commit in interface IDataTransaction
Specified by:
commit in class AbstractDataService.AbstractDataTransaction
Throws:
DataServiceException

abortTransaction

public void abortTransaction()
                      throws DataServiceException
Description copied from interface: IDataTransaction
Tries to abort the currently executing transaction.

Specified by:
abortTransaction in interface IDataTransaction
Throws:
DataServiceException

acceptsMessage

public boolean acceptsMessage(java.lang.Object message)
Description copied from interface: IMessageConsumer
Returns true if this IMessageConsumer accepts the message. This method is allways called before consumeMessage for any given message.

Specified by:
acceptsMessage in interface IMessageConsumer

answerMessage

public java.lang.Object answerMessage(java.lang.Object message)
Description copied from interface: IMessageConsumer
Tells the IMessageConsumer to consume a message and returns a new message that will be delivered to the sender of the originial message.

Specified by:
answerMessage in interface IMessageConsumer

consumeMessage

public void consumeMessage(java.lang.Object message)
Description copied from interface: IMessageConsumer
Tells the IMessageConsumer to consume a message.

Specified by:
consumeMessage in interface IMessageConsumer

copyTransactionData

protected void copyTransactionData(AbstractDataService.AbstractDataTransaction.DataOperation[] sourceDataOperations)

copyEntity

protected void copyEntity(IEntity sourceEntity,
                          IEntity targetEntity)

copyEntityStatusFlags

protected void copyEntityStatusFlags(IEntity sourceEntity,
                                     IEntity targetEntity)


Copyright © 2005 Caleigo. All Rights Reserved.