Class HandshakeState


  • public class HandshakeState
    extends java.lang.Object
    Class maintaining the state of a handshake in progress.
    • 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.
    • Constructor Detail

      • HandshakeState

        public HandshakeState()
    • 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.