Class AuthToken

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected AUTH auth
      A reference to AUTH
      protected Log log  
    • Constructor Summary

      Constructors 
      Constructor Description
      AuthToken()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract boolean authenticate​(AuthToken token, Message msg)
      This method should be implemented to perform the actual authentication of joining members.
      void destroy()  
      abstract java.lang.String getName()
      Used to return the full package and class name of the implementation.
      void init()  
      void setAuth​(AUTH auth)  
      abstract int size()
      The size of the marshalled AuthToken
      void start()  
      void stop()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        protected final Log log
      • auth

        protected AUTH auth
        A reference to AUTH
    • Constructor Detail

      • AuthToken

        public AuthToken()
    • Method Detail

      • setAuth

        public void setAuth​(AUTH auth)
      • init

        public void init()
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • start

        public void start()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • stop

        public void stop()
      • destroy

        public void destroy()
      • getName

        public abstract java.lang.String getName()
        Used to return the full package and class name of the implementation. This is used by the AUTH protocol to create an instance of the implementation.
        Returns:
        a java.lang.String object of the package and class name
      • size

        public abstract int size()
        The size of the marshalled AuthToken
      • authenticate

        public abstract boolean authenticate​(AuthToken token,
                                             Message msg)
        This method should be implemented to perform the actual authentication of joining members.
        Parameters:
        token - the token sent by the joiner
        msg - the Message object containing the actual JOIN_REQ
        Returns:
        true if authenticaion passed or false if it failed.