public class ClientTransactionProcessor extends Object implements IClientTransactionProcessor, IRootPropTransactionSender
Modifier and Type | Method and Description |
---|---|
void |
appendPublicKey(Transaction trans)
Appends the server public key for the Diffie-Hellman key exchange with the client.
|
void |
closeClient(String msg)
Sends an HTML message to be displayed on the client that will immediately close the connection.
|
Transaction |
createTransaction()
Creates a transaction with the configured write cache.
|
String |
getClientContextMenuReference(UIContextMenu contextMenu)
Gets the reference to use for a context menu.
|
ClientParams |
getClientParams()
Gets the client parameters.
|
ClientProps |
getClientProps()
Gets the client properties.
|
int |
getLockSerial()
Returns the lock serial number.
|
boolean |
isConnected()
Verifies 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 |
postClientUpdate()
Posts an update to the root property to potentially perform client transactions.
|
void |
processTransaction(SessionTransMgr manager,
Transaction trans)
Process incoming transaction that itself can consist of several sub-transactions.
|
void |
restartRemoteClient()
Restarts the remote client.
|
void |
sendTransaction(Transaction trans)
Sends the transaction to the remote party.
|
void |
setBusy(boolean isBusy)
Sets the client session busy state.
|
void |
setBusy(boolean isBusy,
String msg,
int delay,
int progress)
Sets the client session busy state.
|
void |
showMessageInClient(int severity,
String heading,
String msg)
Sends an error message to be displayed on the client immediately.
|
void |
updateAuthentication(Transaction trans)
Updates the current user with a password that is encrypted in AES/CBC 256-bit.
|
public ClientParams getClientParams()
public void onConnection(SessionTransMgr manager)
onConnection
in interface ITransactionProcessor
public void onPause(SessionTransMgr manager)
onPause
in interface ITransactionProcessor
public void onReconnected(SessionTransMgr manager)
onReconnected
in interface ITransactionProcessor
public void onDisposed(SessionTransMgr manager)
onDisposed
in interface ITransactionProcessor
public void processTransaction(SessionTransMgr manager, Transaction trans)
Management transaction are not present here, but GConstants.TRANS_NEXT_SERIAL
that should call manager.onNextSerialTransaction();
.
processTransaction
in interface ITransactionProcessor
trans
- The transaction to process.public ClientProps getClientProps()
public Transaction createTransaction()
createTransaction
in interface ITransactionCreator
public void sendTransaction(Transaction trans)
sendTransaction
in interface IRootPropTransactionSender
trans
- The transaction.public void postClientUpdate()
public boolean isConnected()
isConnected
in interface IRootPropTransactionSender
public void restartRemoteClient()
public void showMessageInClient(int severity, String heading, String msg)
severity
- The message severity (-1 none, 0=info, 1=warning, 2=error).heading
- The heading text.msg
- The message text.public void closeClient(String msg)
msg
- The message text in HTML.public void setBusy(boolean isBusy)
isBusy
- The busy state.public void setBusy(boolean isBusy, String msg, int delay, int progress)
isBusy
- The busy state (must be true to display message or progress).msg
- Message to display in HTML format, null for none, ignored when "ready" (busy=false).delay
- Delay in milliseconds: -2=default, -1=disabled, 0=no delay, >0 to 20000 delay in milliseconds.progress
- The progress state: -1 for none, otherwise a value between 0 and 100.public int getLockSerial()
public String getClientContextMenuReference(UIContextMenu contextMenu)
getClientContextMenuReference
in interface IRootPropTransactionSender
contextMenu
- The context menu.public void appendPublicKey(Transaction trans)
appendPublicKey
in interface IClientTransactionProcessor
trans
- The transaction.public void updateAuthentication(Transaction trans) throws Exception
updateAuthentication
in interface IClientTransactionProcessor
trans
- The transactionException
- If there is any kind of problem with the authentication, transaction, encryption or alike.iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.