com.pcbsys.nirvana.client.nTransaction Class Reference

This class enables the client to perform transactional publishing, representing a nirvana transaction. More...


Public Member Functions

void abort () throws nSessionNotConnectedException, nRequestTimedOutException, nChannelNotFoundException, nSecurityException, nUnexpectedResponseException, nTransactionNotStartedException, nTransactionNoSuchTXIDException, nTransactionAlreadyCommittedException, nSessionPausedException,nTransactionAlreadyAbortedException
 Aborts the transaction associated with the txid provided and this channel.
void Abort () throws nSessionNotConnectedException, nRequestTimedOutException, nChannelNotFoundException, nSecurityException, nUnexpectedResponseException,nSessionPausedException, nTransactionNotStartedException, nTransactionNoSuchTXIDException, nTransactionAlreadyCommittedException, nTransactionAlreadyAbortedException
 Aborts the transaction associated with the txid provided and this channel.
void commit (long delay) throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nTransactionNotStartedException, nUnexpectedResponseException, nChannelNotFoundException, nTransactionNoSuchTXIDException, nSecurityException, nTransactionAlreadyCommittedException, nTransactionAlreadyAbortedException
 Commits the transaction id associated to this channel on the server.
void Commit (long delay) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nTransactionNotStartedException, nUnexpectedResponseException, nChannelNotFoundException, nTransactionNoSuchTXIDException, nSecurityException, nTransactionAlreadyCommittedException, nTransactionAlreadyAbortedException
 Commits the transaction id associated to this channel on the server.
void commit (Date timeToPublish) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nTransactionNotStartedException, nUnexpectedResponseException, nChannelNotFoundException, nTransactionNoSuchTXIDException, nSecurityException, nTransactionAlreadyCommittedException, nTransactionAlreadyAbortedException
 Commits the transaction id associated to this channel on the server.
void Commit (Date timeToPublish) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nTransactionNotStartedException, nUnexpectedResponseException, nChannelNotFoundException, nTransactionNoSuchTXIDException, nSecurityException, nTransactionAlreadyCommittedException, nTransactionAlreadyAbortedException
 Commits the transaction id associated to this channel on the server.
void commit () throws nSessionNotConnectedException,nRequestTimedOutException, nTransactionNotStartedException, nUnexpectedResponseException,nSessionPausedException, nChannelNotFoundException, nTransactionNoSuchTXIDException, nSecurityException, nTransactionAlreadyCommittedException, nTransactionAlreadyAbortedException
 Commits the transaction id associated to this channel on the server.
void Commit () throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nTransactionNotStartedException, nUnexpectedResponseException, nChannelNotFoundException, nTransactionNoSuchTXIDException, nSecurityException, nTransactionAlreadyCommittedException, nTransactionAlreadyAbortedException
 Commits the transaction id associated to this channel on the server.
nTransactionAttributes getAttributes ()
 Gets the transaction attributes object associated with this transaction.
long getEndEID () throws nTransactionNotCommittedException
 Gets the end event id of the range to be published by this transaction.
long getStartEID () throws nTransactionNotCommittedException
 Gets the start event id of the range to be published by this transaction.
long getTXID ()
 Gets the end transaction id associated with this transaction.
boolean isAborted (boolean forceRemoteCheck) throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nTransactionIncompleteException
 Method that checks if this transaction is aborted.
boolean IsAborted (boolean forceRemoteCheck) throws nSessionNotConnectedException,nSessionPausedException, nRequestTimedOutException, nTransactionIncompleteException
 Method that checks if this transaction is aborted.
boolean isAborted () throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nTransactionIncompleteException
 Checks if this transaction is aborted.
boolean IsAborted () throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nTransactionIncompleteException
 Checks if this transaction is aborted.
boolean isCommitted (boolean forceRemoteCheck) throws nSessionNotConnectedException, nSessionPausedException, nUnknownTransactionIdException, nRequestTimedOutException, nTransactionIncompleteException
 Method that checks if this transaction is committed.
boolean IsCommitted (boolean forceRemoteCheck) throws nSessionNotConnectedException, nSessionPausedException, nUnknownTransactionIdException, nRequestTimedOutException ,nTransactionIncompleteException
 Method that checks if this transaction is committed.
boolean isCommitted () throws nSessionNotConnectedException,nSessionPausedException,nUnknownTransactionIdException, nRequestTimedOutException, nTransactionIncompleteException
 Checks if this transaction is committed.
boolean IsCommitted () throws nSessionNotConnectedException, nSessionPausedException, nUnknownTransactionIdException, nRequestTimedOutException, nTransactionIncompleteException
 Checks if this transaction is committed.
void publish (java.util.Vector events) throws nSessionNotConnectedException, nTransactionAlreadyCommittedException, nTransactionNoEventsException, nSecurityException, nSessionPausedException,nTransactionAlreadyAbortedException
 Adds the specified collection of nConsumeEvent objects to this transaction.
void publish (String tag, Document adom) throws nSessionNotConnectedException, nSessionPausedException,nTransactionAlreadyCommittedException, nSecurityException, nTransactionAlreadyAbortedException
 Adds the specified XML DOM document to this transaction.
void publish (nConsumeEvent e) throws nSessionNotConnectedException, nSessionPausedException,nTransactionAlreadyCommittedException, nSecurityException, nTransactionAlreadyAbortedException
 Adds the specified nConsumeEvent to this transaction.
void push (nConsumeEvent event) throws nSessionNotConnectedException, nSessionPausedException,nTransactionAlreadyCommittedException, nTransactionNoEventsException, nSecurityException, nTransactionAlreadyAbortedException
 Pushes the specified nConsumeEvent to this transaction.

Static Public Member Functions

static boolean IsAborted (nAbstractChannel chan, long txid) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException
 Static method that checks if a transaction is aborted.
static boolean IsCommitted (nAbstractChannel chan, long txid) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException
 Static method that checks if a transaction is committed.

Detailed Description

This class enables the client to perform transactional publishing, representing a nirvana transaction.

Member Function Documentation

Aborts the transaction associated with the txid provided and this channel.

Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nChannelNotFoundException The channel, typically, has been deleted
nSecurityException The client does not have permissions to perform this operation
nUnexpectedResponseException The server responded with with an unknown response, see the message for more information
nTransactionNotStartedException The transaction has not been started
nTransactionNoSuchTXIDException There is no known TXID, typically the transaction has timed out
nTransactionAlreadyCommittedException The transaction has already been committed
nTransactionAlreadyAbortedException The transaction has already been aborted
nSessionPausedException The session is currently paused

Aborts the transaction associated with the txid provided and this channel.

Deprecated:
As of version 2.0 use the corresponding abort()
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nChannelNotFoundException The channel, typically, has been deleted
nSecurityException The client does not have permissions to perform this operation
nUnexpectedResponseException The server responded with with an unknown response, see the message for more information
nTransactionNotStartedException The transaction has not been started
nTransactionNoSuchTXIDException There is no known TXID, typically the transaction has timed out
nTransactionAlreadyCommittedException The transaction has already been committed
nTransactionAlreadyAbortedException The transaction has already been aborted
nSessionPausedException The session is currently paused

Commits the transaction id associated to this channel on the server.

This method allows the transaction to be delayed until t+delay before it is committed

We then wait for the server to respond. The server responds with the EID's of the events that have been put on to this channel for the supplied transaction id. Once this process is complete we remove the supplied transaction id from the list of transactions found within the controlling nSession.

Parameters:
delay - the number of millseconds to delay the commit for at the server
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nChannelNotFoundException The channel, typically, has been deleted
nSecurityException The client does not have permissions to perform this operation
nUnexpectedResponseException The server responded with with an unknown response, see the message for more information
nTransactionNotStartedException The transaction has not been started
nTransactionNoSuchTXIDException There is no known TXID, typically the transaction has timed out
nTransactionAlreadyCommittedException The transaction has already been committed
nTransactionAlreadyAbortedException The transaction has already been aborted
nSessionPausedException The session is currently paused

Commits the transaction id associated to this channel on the server.

We then wait for the server to respond. The server responds with the EID's of the events that have been put on to this channel for the supplied transaction id. Once this process is complete we remove the supplied transaction id from the list of transactions found within the controlling nSession.

Deprecated:
As of version 2.0 use the corresponding commit(Date timeToPublish)
Parameters:
delay - the number of millseconds to delay the commit for at the server
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nChannelNotFoundException The channel, typically, has been deleted
nSecurityException The client does not have permissions to perform this operation
nUnexpectedResponseException The server responded with with an unknown response, see the message for more information
nTransactionNotStartedException The transaction has not been started
nTransactionNoSuchTXIDException There is no known TXID, typically the transaction has timed out
nTransactionAlreadyCommittedException The transaction has already been committed
nTransactionAlreadyAbortedException The transaction has already been aborted
nSessionPausedException The session is currently paused

Commits the transaction id associated to this channel on the server.

This methos allows the transaction to be committed at a future date, rather than immediately.

We then wait for the server to respond. The server responds with the EID's of the events that have been put on to this channel for the supplied transaction id. Once this process is complete we remove the supplied transaction id from the list of transactions found within the controlling nSession.

Parameters:
timeToPublish date at which the transaction will be committed
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nChannelNotFoundException The channel, typically, has been deleted
nSecurityException The client does not have permissions to perform this operation
nUnexpectedResponseException The server responded with with an unknown response, see the message for more information
nTransactionNotStartedException The transaction has not been started
nTransactionNoSuchTXIDException There is no known TXID, typically the transaction has timed out
nTransactionAlreadyCommittedException The transaction has already been committed
nTransactionAlreadyAbortedException The transaction has already been aborted
nSessionPausedException The session is currently paused

Commits the transaction id associated to this channel on the server.

We then wait for the server to respond. The server responds with the EID's of the events that have been put on to this channel for the supplied transaction id. Once this process is complete we remove the supplied transaction id from the list of transactions found within the controlling nSession.

Deprecated:
As of version 2.0 use the corresponding commit(Date timeToPublish)
Parameters:
timeToPublish date at which the transaction will be committed
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nChannelNotFoundException The channel, typically, has been deleted
nSecurityException The client does not have permissions to perform this operation
nUnexpectedResponseException The server responded with with an unknown response, see the message for more information
nTransactionNotStartedException The transaction has not been started
nTransactionNoSuchTXIDException There is no known TXID, typically the transaction has timed out
nTransactionAlreadyCommittedException The transaction has already been committed
nTransactionAlreadyAbortedException The transaction has already been aborted
nSessionPausedException The session is currently paused

Commits the transaction id associated to this channel on the server.

We then wait for the server to respond. The server responds with the EID's of the events that have been put on to this channel for the supplied transaction id. Once this process is complete we remove the supplied transaction id from the list of transactions found within the controlling nSession.

Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nChannelNotFoundException The channel, typically, has been deleted
nSecurityException The client does not have permissions to perform this operation
nUnexpectedResponseException The server responded with with an unknown response, see the message for more information
nTransactionNotStartedException The transaction has not been started
nTransactionNoSuchTXIDException There is no known TXID, typically the transaction has timed out
nTransactionAlreadyCommittedException The transaction has already been committed
nTransactionAlreadyAbortedException The transaction has already been aborted
nSessionPausedException The session is currently paused

Commits the transaction id associated to this channel on the server.

We then wait for the server to respond. The server responds with the EID's of the events that have been put on to this channel for the supplied transaction id. Once this process is complete we remove the supplied transaction id from the list of transactions found within the controlling nSession.

Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nChannelNotFoundException The channel, typically, has been deleted
nSecurityException The client does not have permissions to perform this operation
nUnexpectedResponseException The server responded with with an unknown response, see the message for more information
nTransactionNotStartedException The transaction has not been started
nTransactionNoSuchTXIDException There is no known TXID, typically the transaction has timed out
nTransactionAlreadyCommittedException The transaction has already been committed
nTransactionAlreadyAbortedException The transaction has already been aborted
nSessionPausedException The session is currently paused
Deprecated:
As of version 2.0 use the corresponding commit()

nTransactionAttributes com.pcbsys.nirvana.client.nTransaction.getAttributes (  ) 

Gets the transaction attributes object associated with this transaction.

Returns:
a nTransactionAttributes object with the attributes for this transaction

long com.pcbsys.nirvana.client.nTransaction.getEndEID (  )  throws nTransactionNotCommittedException

Gets the end event id of the range to be published by this transaction.

Returns:
a long specifying the end event id of the range to be published by this transaction
Exceptions:
nTransactionNotCommittedException is thrown if the transaction is not yet commited

long com.pcbsys.nirvana.client.nTransaction.getStartEID (  )  throws nTransactionNotCommittedException

Gets the start event id of the range to be published by this transaction.

Returns:
a long specifying the start event id of the range to be published by this transaction
Exceptions:
nTransactionNotCommittedException is thrown if the transaction is not yet commited

long com.pcbsys.nirvana.client.nTransaction.getTXID (  ) 

Gets the end transaction id associated with this transaction.

Returns:
a long specifying the transaction ID

static boolean com.pcbsys.nirvana.client.nTransaction.IsAborted ( nAbstractChannel  chan,
long  txid 
) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException [static]

Static method that checks if a transaction is aborted.

Deprecated:
As of version 2.0 use the corresponding nTransaction(nTransactionAttributes, txid)
Parameters:
chan the channel associated with the transaction
txid the transaction id of the transaction you want to check on the server
Returns:
a boolean value specifying if the transaction has been aborted
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nSessionPausedException The session is currently paused

boolean com.pcbsys.nirvana.client.nTransaction.isAborted ( boolean  forceRemoteCheck  )  throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nTransactionIncompleteException

Method that checks if this transaction is aborted.

Parameters:
forceRemoteCheck if false, the transaction will check its local state first before checking with the realm server, if true, it will check with the realm server only
Returns:
a boolean value specifying if the transaction has been aborted
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nSessionPausedException The session is currently paused
nTransactionIncompleteException the transaction is invalild or incomplete

boolean com.pcbsys.nirvana.client.nTransaction.IsAborted ( boolean  forceRemoteCheck  )  throws nSessionNotConnectedException,nSessionPausedException, nRequestTimedOutException, nTransactionIncompleteException

Method that checks if this transaction is aborted.

Deprecated:
As of version 2.0 use the corresponding isAborted(forecRemoteCheck)
Parameters:
forceRemoteCheck if false, the transaction will check its local state first before checking with the realm server, if true, it will check with the realm server only
Returns:
a boolean value specifying if the transaction has been aborted
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nSessionPausedException The session is currently paused
nTransactionIncompleteException the transaction is invalild or incomplete

boolean com.pcbsys.nirvana.client.nTransaction.isAborted (  )  throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException, nTransactionIncompleteException

Checks if this transaction is aborted.

Returns:
a boolean value specifying if this transaction has been aborted
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nSessionPausedException The session is currently paused
nTransactionIncompleteException the transaction is invalild or incomplete

boolean com.pcbsys.nirvana.client.nTransaction.IsAborted (  )  throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nTransactionIncompleteException

Checks if this transaction is aborted.

Deprecated:
As of version 2.0 use the corresponding isAborted()
Returns:
a boolean value specifying if this transaction has been aborted
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nSessionPausedException The session is currently paused
nTransactionIncompleteException the transaction is invalild or incomplete

static boolean com.pcbsys.nirvana.client.nTransaction.IsCommitted ( nAbstractChannel  chan,
long  txid 
) throws nSessionNotConnectedException, nSessionPausedException,nRequestTimedOutException [static]

Static method that checks if a transaction is committed.

Deprecated:
As of version 2.0 use the corresponding nTransaction(nTransactionAttributes, txId)
Parameters:
chan the channel associated with the transaction
txid the transaction id of the transaction you want to check on the server
Returns:
a boolean value specifying if the transaction has been committed
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nSessionPausedException The session is currently paused

boolean com.pcbsys.nirvana.client.nTransaction.isCommitted ( boolean  forceRemoteCheck  )  throws nSessionNotConnectedException, nSessionPausedException, nUnknownTransactionIdException, nRequestTimedOutException, nTransactionIncompleteException

Method that checks if this transaction is committed.

Parameters:
forceRemoteCheck if false, the transaction will check its local state first before checking with the realms server, if true, it will check with the realm server only
Returns:
a boolean value specifying if the transaction has been committed
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nSessionPausedException The session is currently paused
nTransactionIncompleteException the transaction is invalild or incomplete
nUnknownTransactionIdException the transaction id is not known on this server

boolean com.pcbsys.nirvana.client.nTransaction.IsCommitted ( boolean  forceRemoteCheck  )  throws nSessionNotConnectedException, nSessionPausedException, nUnknownTransactionIdException, nRequestTimedOutException ,nTransactionIncompleteException

Method that checks if this transaction is committed.

Deprecated:
As of version 2.0 use the corresponding isCommitted(forceRemoteCheck)
Parameters:
forceRemoteCheck if false, the transaction will check its local state first before checking with the realms server, if true, it will check with the realm server only
Returns:
a boolean value specifying if the transaction has been committed
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nSessionPausedException The session is currently paused
nTransactionIncompleteException the transaction is invalild or incomplete
nUnknownTransactionIdException the transaction id is not known on this server

Checks if this transaction is committed.

Returns:
a boolean value specifying if this transaction has been committed
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nSessionPausedException The session is currently paused
nTransactionIncompleteException the transaction is invalild or incomplete
nUnknownTransactionIdException the transaction id is not known on this server

Checks if this transaction is committed.

Deprecated:
As of version 2.0 use the corresponding isCommitted()
Returns:
a boolean value specifying if this transaction has been committed
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nRequestTimedOutException The server did not respond within the timeout peroid
nSessionPausedException The session is currently paused
nTransactionIncompleteException the transaction is invalild or incomplete
nUnknownTransactionIdException the transaction id is not known on this server

Adds the specified collection of nConsumeEvent objects to this transaction.

No events will be published until this transaction is commited.

Parameters:
events the Vector collection of nConsumeEvent objects to be added to this transaction
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nSecurityException The client does not have permissions to perform this operation
nTransactionAlreadyCommittedException The transaction has already been committed
nTransactionAlreadyAbortedException The transaction has already been aborted
nTransactionNoEventsException There are no nConsumeEvents in the vector
nSessionPausedException The session is currently paused

void com.pcbsys.nirvana.client.nTransaction.publish ( String  tag,
Document  adom 
) throws nSessionNotConnectedException, nSessionPausedException,nTransactionAlreadyCommittedException, nSecurityException, nTransactionAlreadyAbortedException

Adds the specified XML DOM document to this transaction.

No events will be published until this transaction is commited

Parameters:
tag a string specifying the event tag to be used
adom an XML DOM document object specifying the XML document to be added to this transaction
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nSecurityException The client does not have permissions to perform this operation
nTransactionAlreadyCommittedException The transaction has already been committed
nTransactionAlreadyAbortedException The transaction has already been aborted
nSessionPausedException The session is currently paused

Adds the specified nConsumeEvent to this transaction.

No events will be published until this transaction is commited

Parameters:
e the nConsumeEvent object to be added to this transaction
Exceptions:
nSessionNotConnectedException The session is not currently conencted to the server when this call was made
nSecurityException The client does not have permissions to perform this operation
nTransactionAlreadyCommittedException The transaction has already been committed
nTransactionAlreadyAbortedException The transaction has already been aborted
nSessionPausedException The session is currently paused

Pushes the specified nConsumeEvent to this transaction.

No events will be published until this transaction is commited

Parameters:
event the nConsumeEvent object to be added to this transaction
Exceptions:
nSessionNotConnectedException is thrown if the session is not connected
nTransactionAlreadyCommittedException is thrown if the transaction is already commited
nTransactionNoEventsException is thrown if the transaction has no events pushed
nSecurityException is thrown if the user has insufficient priviledges
nTransactionAlreadyAbortedException is thrown if the transaction has been aborted.
nSessionPausedException The session is currently paused