Package jadex.platform.service.security
Class HandshakeState
- java.lang.Object
-
- jadex.platform.service.security.HandshakeState
-
public class HandshakeState extends java.lang.Object
Class maintaining the state of a handshake in progress.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<java.lang.String>
arrivedmessages
Arrived handshake messages to filter duplicates.protected java.lang.String
conversationid
Conversation ID.protected ICryptoSuite
cryptosuite
The crypto suite once initializedprotected long
expirationtime
Time when the handshake expires.protected Future<ICryptoSuite>
resultfut
Future 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.String
getConversationId()
Gets the conversation ID.ICryptoSuite
getCryptoSuite()
Gets the crypto suite.long
getExpirationTime()
Gets the expiration time of the handshake.Future<ICryptoSuite>
getResultFuture()
Returns the result future.boolean
isDuplicate(BasicSecurityMessage msg)
Filters for duplicate handshake messages.void
setConversationId(java.lang.String conversationid)
Sets the conversation ID.void
setCryptoSuite(ICryptoSuite cryptosuite)
Sets the crypto suite.void
setExpirationTime(long expirationtime)
Sets the expiration time of the handshake.void
setResultFuture(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.
-
-