Package com.iizix.server.vsviewer
Class VSViewerTransactionProcessor
java.lang.Object
com.iizix.server.vsviewer.VSViewerTransactionProcessor
- All Implemented Interfaces:
- ITransactionCreator,- ITransactionProcessor,- IRootPropTransactionSender
public class VSViewerTransactionProcessor extends Object implements ITransactionProcessor, IRootPropTransactionSender
The TransactionProcessor contains all the code required to process transactions with the application being run for a single client reconnectable connection. If parallel client sessions is enabled or allowed, a single AppSessionGyro is shared.
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescription- void- closeClient- (String msg) Sends an HTML message to be displayed on the client that will immediately close the connection.Creates a transaction with the configured write cache.- getClientContextMenuReference- (UIContextMenu contextMenu) Gets the reference to use for a context menu.Gets the VS Viewer parameters.- booleanVerifies that the connection is established and not paused, reconnecting, etc.- void- onConnection- (SessionTransMgr manager) Called when a connection is established.- void- onDisposed- (SessionTransMgr manager) Called when a connection is disposed of.- void- onPause- (SessionTransMgr manager) Called when a connection is paused.- void- onReconnected- (SessionTransMgr manager) Called when a connection is reconnected.- void- processTransaction- (SessionTransMgr manager, ReadTransaction trans) Process incoming transaction that itself can consist of several sub-transactions.- void- sendTransaction- (SendTransaction trans) Sends the transaction to the remote party.- void- showMessageInClient- (int severity, String heading, String msg) Sends an error message to be displayed on the client immediately.
- Method Details- getVSViewerParamsGets the VS Viewer parameters.
- onConnectionCalled when a connection is established.- Specified by:
- onConnectionin interface- ITransactionProcessor
 
- onPauseCalled when a connection is paused.- Specified by:
- onPausein interface- ITransactionProcessor
 
- onReconnectedCalled when a connection is reconnected.- Specified by:
- onReconnectedin interface- ITransactionProcessor
 
- onDisposedCalled when a connection is disposed of.- Specified by:
- onDisposedin interface- ITransactionProcessor
 
- processTransactionProcess incoming transaction that itself can consist of several sub-transactions.- Management transaction are not present here, but GConstants.TRANS_NEXT_SERIAL that should call - manager.onNextSerialTransaction();.- Specified by:
- processTransactionin interface- ITransactionProcessor
- Parameters:
- trans- The transaction to process.
 
- createTransactionCreates a transaction with the configured write cache.- Specified by:
- createTransactionin interface- ITransactionCreator
- Returns:
- The new Transactioninstance.
 
- sendTransactionSends the transaction to the remote party.- Specified by:
- sendTransactionin interface- IRootPropTransactionSender
- Parameters:
- trans- The transaction.
 
- isConnectedpublic boolean isConnected()Verifies that the connection is established and not paused, reconnecting, etc.- Specified by:
- isConnectedin interface- IRootPropTransactionSender
- Returns:
- true if connected, false otherwise.
 
- showMessageInClientSends an error message to be displayed on the client immediately.- Parameters:
- severity- The message severity (-1 none, 0=info, 1=warning, 2=error).
- heading- The heading text.
- msg- The message text.
 
- closeClientSends an HTML message to be displayed on the client that will immediately close the connection.- Parameters:
- msg- The message text in HTML.
 
- getClientContextMenuReferenceGets the reference to use for a context menu.- Specified by:
- getClientContextMenuReferencein interface- IRootPropTransactionSender
- Parameters:
- contextMenu- The context menu.
- Returns:
- The reference to use, empty string for none (never null).