Package jadex.platform.service.security
Class HandshakeState
- java.lang.Object
-
- jadex.platform.service.security.HandshakeState
-
public class HandshakeState extends java.lang.ObjectClass maintaining the state of a handshake in progress.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<java.lang.String>arrivedmessagesArrived handshake messages to filter duplicates.protected java.lang.StringconversationidConversation ID.protected ICryptoSuitecryptosuiteThe crypto suite once initializedprotected longexpirationtimeTime when the handshake expires.protected Future<ICryptoSuite>resultfutFuture used to wait for the handshake to finish.
-
Constructor Summary
Constructors Constructor Description HandshakeState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetConversationId()Gets the conversation ID.ICryptoSuitegetCryptoSuite()Gets the crypto suite.longgetExpirationTime()Gets the expiration time of the handshake.Future<ICryptoSuite>getResultFuture()Returns the result future.booleanisDuplicate(BasicSecurityMessage msg)Filters for duplicate handshake messages.voidsetConversationId(java.lang.String conversationid)Sets the conversation ID.voidsetCryptoSuite(ICryptoSuite cryptosuite)Sets the crypto suite.voidsetExpirationTime(long expirationtime)Sets the expiration time of the handshake.voidsetResultFuture(Future<ICryptoSuite> resultfut)Sets the result future.
-
-
-
Field Detail
-
resultfut
protected Future<ICryptoSuite> resultfut
Future used to wait for the handshake to finish.
-
conversationid
protected java.lang.String conversationid
Conversation ID.
-
cryptosuite
protected ICryptoSuite cryptosuite
The crypto suite once initialized
-
expirationtime
protected long expirationtime
Time when the handshake expires.
-
arrivedmessages
protected java.util.Set<java.lang.String> arrivedmessages
Arrived handshake messages to filter duplicates.
-
-
Method Detail
-
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
public Future<ICryptoSuite> getResultFuture()
Returns the result future.- Returns:
- The result future.
-
setResultFuture
public void setResultFuture(Future<ICryptoSuite> resultfut)
Sets the result future.- Parameters:
resultfut- The result future.
-
getConversationId
public java.lang.String getConversationId()
Gets the conversation ID.- Returns:
- The conversation ID.
-
setConversationId
public void setConversationId(java.lang.String conversationid)
Sets the conversation ID.- Parameters:
conversationid- The conversation ID.
-
getCryptoSuite
public ICryptoSuite getCryptoSuite()
Gets the crypto suite.- Returns:
- The crypto suite.
-
setCryptoSuite
public void setCryptoSuite(ICryptoSuite cryptosuite)
Sets the crypto suite.- Parameters:
cryptosuite- The crypto suite to set.
-
isDuplicate
public boolean isDuplicate(BasicSecurityMessage msg)
Filters for duplicate handshake messages.- Parameters:
msg- The message- Returns:
- True, if message is duplicate.
-
-