|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsds.data.TransactionInfo
public final class TransactionInfo
Message transaction information in terms of requests / responses correlation, expressed by the combination of last and next identifiers.
A typical transaction between two server-oriented distributed objects A and B is described as follows:
Finally, B could also have set a next identifier value if a response from A is needed...
Constructor Summary | |
---|---|
TransactionInfo()
Creates an empty transaction information. |
|
TransactionInfo(TransactionInfo other)
Creates and initializes this transaction information with another information |
Method Summary | |
---|---|
TransactionInfo |
createResponse()
Produces a pre-filled transactional information element from this transactional information (which should be taken from a request message) |
static TransactionInfo |
createResponse(TransactionInfo source)
Produces a pre-filled transactional information element from a given transactional information (which should be taken from a request message) |
java.lang.Long |
getLastIdentifier()
Gets the last identifier |
java.lang.Long |
getNextIdentifier()
Gets the next identifier |
boolean |
hasLastIdentifier()
Checks that this transactional information contains a last identifier |
boolean |
hasNextIdentifier()
Checks that this transactional information contains a next identifier |
boolean |
isInitialized()
Makes sure this transactional information is initialized before inclusion in a message |
boolean |
isSignatureRequired()
|
void |
setLastIdentifier(java.lang.Long lastIdentifier)
Assigns the last identifier value in case this transactional information takes part of a response of a transactional request message. |
void |
setNextIdentifier(java.lang.Long nextIdentifier)
Assigns the next identifier so that the recipient can assign its last identifier value when generating a reply. |
void |
setSignatureRequired(boolean requiresSignature)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransactionInfo()
Creates an empty transaction information. isInitialized()
returns false
public TransactionInfo(TransactionInfo other)
Creates and initializes this transaction information with another information
other
- The existing transaction information to be duplicated.
Null indicates that this transaction information is left
uninitializedMethod Detail |
---|
public TransactionInfo createResponse()
Produces a pre-filled transactional information element from this transactional information (which should be taken from a request message)
public static TransactionInfo createResponse(TransactionInfo source)
Produces a pre-filled transactional information element from a given transactional information (which should be taken from a request message)
source
- The source transaction information (usually taken from a
request message) to be used to create the resulting transactional
information
createResponse()
public java.lang.Long getLastIdentifier()
Gets the last identifier
public void setLastIdentifier(java.lang.Long lastIdentifier)
Assigns the last identifier value in case this transactional information takes part of a response of a transactional request message. This value must be taken from the latter and corresponds to its next identifier
lastIdentifier
- The last transactional identifier or null
for no identifiercreateResponse()
public java.lang.Long getNextIdentifier()
Gets the next identifier
public void setNextIdentifier(java.lang.Long nextIdentifier)
Assigns the next identifier so that the recipient can assign its last identifier value when generating a reply. This value should be randomly generated
nextIdentifier
- The next transactional identifier or null
for no identifier. This identifier is returned back by the enclosing
message recipientspublic boolean hasNextIdentifier()
Checks that this transactional information contains a next identifier
public boolean hasLastIdentifier()
Checks that this transactional information contains a last identifier
public boolean isSignatureRequired()
public void setSignatureRequired(boolean requiresSignature)
requiresSignature
- true only if this transactional
information requires the answer to be digitally signedpublic boolean isInitialized()
Makes sure this transactional information is initialized before inclusion in a message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |