Class SASL


  • @Deprecated
    public class SASL
    extends Protocol
    Deprecated.
    Will be removed in 5.0 (not used anymore)
    The SASL protocol implements authentication and, if requested by the mech, encryption
    Author:
    Tristan Tarrant
    • Field Detail

      • GMS_ID

        public static final short GMS_ID
        Deprecated.
      • SASL_ID

        public static final short SASL_ID
        Deprecated.
      • SASL_PROTOCOL_NAME

        public static final java.lang.String SASL_PROTOCOL_NAME
        Deprecated.
        See Also:
        Constant Field Values
      • login_module_name

        protected java.lang.String login_module_name
        Deprecated.
      • client_name

        protected java.lang.String client_name
        Deprecated.
      • client_password

        protected java.lang.String client_password
        Deprecated.
      • mech

        protected java.lang.String mech
        Deprecated.
      • sasl_props

        protected java.util.Map<java.lang.String,​java.lang.String> sasl_props
        Deprecated.
      • server_name

        protected java.lang.String server_name
        Deprecated.
      • timeout

        protected long timeout
        Deprecated.
      • client_callback_handler

        protected javax.security.auth.callback.CallbackHandler client_callback_handler
        Deprecated.
      • server_callback_handler

        protected javax.security.auth.callback.CallbackHandler server_callback_handler
        Deprecated.
      • client_subject

        protected javax.security.auth.Subject client_subject
        Deprecated.
      • server_subject

        protected javax.security.auth.Subject server_subject
        Deprecated.
      • local_addr

        protected Address local_addr
        Deprecated.
      • sasl_context

        protected final java.util.Map<Address,​SaslContext> sasl_context
        Deprecated.
    • Constructor Detail

      • SASL

        public SASL()
        Deprecated.
    • Method Detail

      • setClientCallbackHandlerClass

        public void setClientCallbackHandlerClass​(java.lang.String handlerClass)
                                           throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • getClientCallbackHandlerClass

        public java.lang.String getClientCallbackHandlerClass()
        Deprecated.
      • getClientCallbackHandler

        public javax.security.auth.callback.CallbackHandler getClientCallbackHandler()
        Deprecated.
      • setClientCallbackHandler

        public void setClientCallbackHandler​(javax.security.auth.callback.CallbackHandler client_callback_handler)
        Deprecated.
      • setServerCallbackHandlerClass

        public void setServerCallbackHandlerClass​(java.lang.String handlerClass)
                                           throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • getServerCallbackHandlerClass

        public java.lang.String getServerCallbackHandlerClass()
        Deprecated.
      • getServerCallbackHandler

        public javax.security.auth.callback.CallbackHandler getServerCallbackHandler()
        Deprecated.
      • setServerCallbackHandler

        public void setServerCallbackHandler​(javax.security.auth.callback.CallbackHandler server_callback_handler)
        Deprecated.
      • setLoginModuleName

        public void setLoginModuleName​(java.lang.String login_module_name)
        Deprecated.
      • getLoginModulename

        public java.lang.String getLoginModulename()
        Deprecated.
      • setMech

        public void setMech​(java.lang.String mech)
        Deprecated.
      • getMech

        public java.lang.String getMech()
        Deprecated.
      • setSaslProps

        public void setSaslProps​(java.lang.String sasl_props)
        Deprecated.
      • setSaslPropsMap

        public void setSaslPropsMap​(java.util.Map<java.lang.String,​java.lang.String> sasl_props)
        Deprecated.
      • getSaslProps

        public java.util.Map<java.lang.String,​java.lang.String> getSaslProps()
        Deprecated.
      • setClientSubject

        public void setClientSubject​(javax.security.auth.Subject client_subject)
        Deprecated.
      • getClientSubject

        public javax.security.auth.Subject getClientSubject()
        Deprecated.
      • setServerSubject

        public void setServerSubject​(javax.security.auth.Subject server_subject)
        Deprecated.
      • getServerSubject

        public javax.security.auth.Subject getServerSubject()
        Deprecated.
      • setServerName

        public void setServerName​(java.lang.String server_name)
        Deprecated.
      • getServerName

        public java.lang.String getServerName()
        Deprecated.
      • setTimeout

        public void setTimeout​(long timeout)
        Deprecated.
      • getTimeout

        public long getTimeout()
        Deprecated.
      • getAddress

        public Address getAddress()
        Deprecated.
      • init

        public void init()
                  throws java.lang.Exception
        Deprecated.
        Description copied from class: Protocol
        Called after instance has been created (null constructor) and before protocol is started. Properties are already set. Other protocols are not yet connected and events cannot yet be sent.
        Overrides:
        init in class Protocol
        Throws:
        java.lang.Exception - Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the channel constructor will throw an exception
      • stop

        public void stop()
        Deprecated.
        Description copied from class: Protocol
        This method is called on a JChannel.disconnect(). Stops work (e.g. by closing multicast socket). Will be called from top to bottom. This means that at the time of the method invocation the neighbor protocol below is still working. This method will replace the STOP, STOP_OK, CLEANUP and CLEANUP_OK events. The ProtocolStack guarantees that when this method is called all messages in the down queue will have been flushed
        Overrides:
        stop in class Protocol
      • destroy

        public void destroy()
        Deprecated.
        Description copied from class: Protocol
        This method is called on a JChannel.close(). Does some cleanup; after the call the VM will terminate
        Overrides:
        destroy in class Protocol
      • up

        public java.lang.Object up​(Message msg)
        Deprecated.
        Description copied from class: Protocol
        A single message was received. Protocols may examine the message and do something (e.g. add a header) with it before passing it up.
        Overrides:
        up in class Protocol
      • up

        public void up​(MessageBatch batch)
        Deprecated.
        Description copied from class: Protocol
        Sends up a multiple messages in a MessageBatch. The sender of the batch is always the same, and so is the destination (null == multicast messages). Messages in a batch can be OOB messages, regular messages, or mixed messages, although the transport itself will create initial MessageBatches that contain only either OOB or regular messages.

        The default processing below sends messages up the stack individually, based on a matching criteria (calling Protocol.accept(org.jgroups.Message)), and - if true - calls Protocol.up(org.jgroups.Event) for that message and removes the message. If the batch is not empty, it is passed up, or else it is dropped.

        Subclasses should check if there are any messages destined for them (e.g. using MessageBatch.getMatchingMessages(short,boolean)), then possibly remove and process them and finally pass the batch up to the next protocol. Protocols can also modify messages in place, e.g. ENCRYPT could decrypt all encrypted messages in the batch, not remove them, and pass the batch up when done.

        Overrides:
        up in class Protocol
        Parameters:
        batch - The message batch
      • down

        public java.lang.Object down​(Event evt)
        Deprecated.
        Description copied from class: Protocol
        An event is to be sent down the stack. A protocol may want to examine its type and perform some action on it, depending on the event's type. If the event is a message MSG, then the protocol may need to add a header to it (or do nothing at all) before sending it down the stack using down_prot.down().
        Overrides:
        down in class Protocol
      • down

        public java.lang.Object down​(Message msg)
        Deprecated.
        Description copied from class: Protocol
        A message is sent down the stack. Protocols may examine the message and do something (e.g. add a header) with it before passing it down.
        Overrides:
        down in class Protocol
      • sendRejectionMessage

        protected void sendRejectionMessage​(byte type,
                                            Address dest,
                                            java.lang.String error_msg)
        Deprecated.
      • sendJoinRejectionMessage

        protected void sendJoinRejectionMessage​(Address dest,
                                                java.lang.String error_msg)
        Deprecated.
      • sendMergeRejectionMessage

        protected void sendMergeRejectionMessage​(Address dest)
        Deprecated.