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

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
nSessionNotConnectedExceptionThe session is not currently connected to the server when this call was made
nRequestTimedOutExceptionThe server did not respond within the timeout peroid
nChannelNotFoundExceptionThe channel, typically, has been deleted
nSecurityExceptionThe client does not have permissions to perform this operation
nUnexpectedResponseExceptionThe server responded with with an unknown response, see the message for more information
nTransactionNotStartedExceptionThe transaction has not been started
nTransactionNoSuchTXIDExceptionThere is no known TXID, typically the transaction has timed out
nTransactionAlreadyCommittedExceptionThe transaction has already been committed
nTransactionAlreadyAbortedExceptionThe transaction has already been aborted
nSessionPausedExceptionThe session is currently paused
nMaxBufferSizeExceededExceptionis thrown when elements of the event being sent exceed the connection's max buffer size

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
nSessionNotConnectedExceptionThe session is not currently connected to the server when this call was made
nRequestTimedOutExceptionThe server did not respond within the timeout peroid
nChannelNotFoundExceptionThe channel, typically, has been deleted
nSecurityExceptionThe client does not have permissions to perform this operation
nUnexpectedResponseExceptionThe server responded with with an unknown response, see the message for more information
nTransactionNotStartedExceptionThe transaction has not been started
nTransactionNoSuchTXIDExceptionThere is no known TXID, typically the transaction has timed out
nTransactionAlreadyCommittedExceptionThe transaction has already been committed
nTransactionAlreadyAbortedExceptionThe transaction has already been aborted
nSessionPausedExceptionThe session is currently paused
nMaxBufferSizeExceededExceptionis thrown when elements of the event being sent exceed the connection's max buffer size

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
timeToPublishdate at which the transaction will be committed
Exceptions
nSessionNotConnectedExceptionThe session is not currently connected to the server when this call was made
nRequestTimedOutExceptionThe server did not respond within the timeout peroid
nChannelNotFoundExceptionThe channel, typically, has been deleted
nSecurityExceptionThe client does not have permissions to perform this operation
nUnexpectedResponseExceptionThe server responded with with an unknown response, see the message for more information
nTransactionNotStartedExceptionThe transaction has not been started
nTransactionNoSuchTXIDExceptionThere is no known TXID, typically the transaction has timed out
nTransactionAlreadyCommittedExceptionThe transaction has already been committed
nTransactionAlreadyAbortedExceptionThe transaction has already been aborted
nSessionPausedExceptionThe session is currently paused
nMaxBufferSizeExceededExceptionis thrown when elements of the event being sent exceed the connection's max buffer size

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
nSessionNotConnectedExceptionThe session is not currently connected to the server when this call was made
nRequestTimedOutExceptionThe server did not respond within the timeout peroid
nChannelNotFoundExceptionThe channel, typically, has been deleted
nSecurityExceptionThe client does not have permissions to perform this operation
nUnexpectedResponseExceptionThe server responded with with an unknown response, see the message for more information
nTransactionNotStartedExceptionThe transaction has not been started
nTransactionNoSuchTXIDExceptionThere is no known TXID, typically the transaction has timed out
nTransactionAlreadyCommittedExceptionThe transaction has already been committed
nTransactionAlreadyAbortedExceptionThe transaction has already been aborted
nSessionPausedExceptionThe session is currently paused
nMaxBufferSizeExceededExceptionis thrown when elements of the event being sent exceed the connection's max buffer size
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
nTransactionNotCommittedExceptionis 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
nTransactionNotCommittedExceptionis 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
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
nSessionNotConnectedExceptionThe session is not currently connected to the server when this call was made
nRequestTimedOutExceptionThe server did not respond within the timeout peroid
nSessionPausedExceptionThe session is currently paused
nTransactionIncompleteExceptionthe transaction is invalid or incomplete
boolean com.pcbsys.nirvana.client.nTransaction.isAborted ( boolean  forceRemoteCheck) throws nSessionNotConnectedException, nSessionPausedException, nRequestTimedOutException, nTransactionIncompleteException

Method that checks if this transaction is aborted.

Parameters
forceRemoteCheckif 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
nSessionNotConnectedExceptionThe session is not currently connected to the server when this call was executed
nRequestTimedOutExceptionThe server did not respond within the timeout peroid
nSessionPausedExceptionThe session is currently paused
nTransactionIncompleteExceptionthe transaction is invalid or incomplete

Checks if this transaction is committed.

Returns
a boolean value specifying if this transaction has been committed
Exceptions
nSessionNotConnectedExceptionThe session is not currently connected to the server when this call was made
nRequestTimedOutExceptionThe server did not respond within the timeout peroid
nSessionPausedExceptionThe session is currently paused
nTransactionIncompleteExceptionthe transaction is invalild or incomplete
nUnknownTransactionIdExceptionthe 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.

Parameters
forceRemoteCheckif 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
nSessionNotConnectedExceptionThe session is not currently connected to the server when this call was made
nRequestTimedOutExceptionThe server did not respond within the timeout peroid
nSessionPausedExceptionThe session is currently paused
nTransactionIncompleteExceptionthe transaction is invalild or incomplete
nUnknownTransactionIdExceptionthe transaction id is not known on this server
void com.pcbsys.nirvana.client.nTransaction.publish ( nConsumeEvent  e) throws nSessionNotConnectedException, nSessionPausedException, nTransactionAlreadyCommittedException, nSecurityException, nTransactionAlreadyAbortedException, nMaxBufferSizeExceededException

Adds the specified nConsumeEvent to this transaction.

No events will be published until this transaction is committed

Parameters
ethe nConsumeEvent object to be added to this transaction
Exceptions
nSessionNotConnectedExceptionThe session is not currently connected to the server when this call was made
nSecurityExceptionThe client does not have permissions to perform this operation
nTransactionAlreadyCommittedExceptionThe transaction has already been committed
nTransactionAlreadyAbortedExceptionThe transaction has already been aborted
nSessionPausedExceptionThe session is currently paused
nMaxBufferSizeExceededExceptionis thrown when elements of the event being sent exceed the connection's max buffer size
void com.pcbsys.nirvana.client.nTransaction.publish ( String  tag,
Document  adom 
) throws nSessionNotConnectedException, nSessionPausedException, nTransactionAlreadyCommittedException, nSecurityException, nTransactionAlreadyAbortedException, nMaxBufferSizeExceededException

Adds the specified XML DOM document to this transaction.

No events will be published until this transaction is commited

Parameters
taga string specifying the event tag to be used
adoman XML DOM document object specifying the XML document to be added to this transaction
Exceptions
nSessionNotConnectedExceptionThe session is not currently connected to the server when this call was made
nSecurityExceptionThe client does not have permissions to perform this operation
nTransactionAlreadyCommittedExceptionThe transaction has already been committed
nTransactionAlreadyAbortedExceptionThe transaction has already been aborted
nSessionPausedExceptionThe session is currently paused
nMaxBufferSizeExceededExceptionis thrown when elements of the event being sent exceed the connection's max buffer size
Deprecated:
XML based documents are deprecated as of version 10.2
void com.pcbsys.nirvana.client.nTransaction.publish ( java.util.Vector  events) throws nSessionNotConnectedException, nTransactionAlreadyCommittedException, nTransactionNoEventsException, nSecurityException, nSessionPausedException, nTransactionAlreadyAbortedException, nMaxBufferSizeExceededException

Adds the specified collection of nConsumeEvent objects to this transaction.

No events will be published until this transaction is committed.

Parameters
eventsthe Vector collection of nConsumeEvent objects to be added to this transaction
Exceptions
nSessionNotConnectedExceptionThe session is not currently connected to the server when this call was made
nSecurityExceptionThe client does not have permissions to perform this operation
nTransactionAlreadyCommittedExceptionThe transaction has already been committed
nTransactionAlreadyAbortedExceptionThe transaction has already been aborted
nTransactionNoEventsExceptionThere are no nConsumeEvents in the vector
nSessionPausedExceptionThe session is currently paused
nMaxBufferSizeExceededExceptionis thrown when elements of the event being sent exceed the connection's max buffer size
void com.pcbsys.nirvana.client.nTransaction.push ( nConsumeEvent  event) throws nSessionNotConnectedException, nSessionPausedException, nTransactionAlreadyCommittedException, nSecurityException, nTransactionAlreadyAbortedException, nMaxBufferSizeExceededException

Pushes the specified nConsumeEvent to this transaction.

No events will be published until this transaction is committed

Parameters
eventthe nConsumeEvent object to be added to this transaction
Exceptions
nSessionNotConnectedExceptionis thrown if the session is not connected
nTransactionAlreadyCommittedExceptionis thrown if the transaction is already commited
nSecurityExceptionis thrown if the user has insufficient priviledges
nTransactionAlreadyAbortedExceptionThe transaction has already been aborted, one way this can occur is if the underlying store that the transaction was working with is deleted
nSessionPausedExceptionThe session is currently paused
nMaxBufferSizeExceededExceptionis thrown when elements of the event being sent exceed the connection's max buffer size