Package jadex.ipc.impl.security
Class HandshakeState
java.lang.Object
jadex.ipc.impl.security.HandshakeState
Class maintaining the state of a handshake in progress.
-
Field Summary
FieldsModifier and TypeFieldDescriptionArrived handshake messages to filter duplicates.protected StringConversation ID.protected ICryptoSuiteThe crypto suite once initializedprotected longTime when the handshake expires.protected jadex.future.Future<ICryptoSuite> Future used to wait for the handshake to finish. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the conversation ID.Gets the crypto suite.longGets the expiration time of the handshake.jadex.future.Future<ICryptoSuite> Returns the result future.booleanFilters for duplicate handshake messages.voidsetConversationId(String conversationid) Sets the conversation ID.voidsetCryptoSuite(ICryptoSuite cryptosuite) Sets the crypto suite.voidsetExpirationTime(long expirationtime) Sets the expiration time of the handshake.voidsetResultFuture(jadex.future.Future<ICryptoSuite> resultfut) Sets the result future.
-
Field Details
-
resultfut
Future used to wait for the handshake to finish. -
conversationid
Conversation ID. -
cryptosuite
The crypto suite once initialized -
expirationtime
protected long expirationtimeTime when the handshake expires. -
arrivedmessages
Arrived handshake messages to filter duplicates.
-
-
Constructor Details
-
HandshakeState
public HandshakeState()
-
-
Method Details
-
setExpirationTime
public void setExpirationTime(long expirationtime) Sets the expiration time of the handshake.- Parameters:
expirationtime- The expiration time of the handshake.
-
getExpirationTime
public long getExpirationTime()Gets the expiration time of the handshake.- Returns:
- The expiration time of the handshake.
-
getResultFuture
Returns the result future.- Returns:
- The result future.
-
setResultFuture
Sets the result future.- Parameters:
resultfut- The result future.
-
getConversationId
Gets the conversation ID.- Returns:
- The conversation ID.
-
setConversationId
Sets the conversation ID.- Parameters:
conversationid- The conversation ID.
-
getCryptoSuite
Gets the crypto suite.- Returns:
- The crypto suite.
-
setCryptoSuite
Sets the crypto suite.- Parameters:
cryptosuite- The crypto suite to set.
-
isDuplicate
Filters for duplicate handshake messages.- Parameters:
msg- The message- Returns:
- True, if message is duplicate.
-