Interface ConnectionHandler

    • Method Detail

      • open

        org.xnio.Cancellable open​(String serviceType,
                                  org.xnio.Result<Channel> result,
                                  org.xnio.OptionMap optionMap)
        Open a request handler.
        Parameters:
        serviceType - the service type string
        result - the result for the connected channel
        optionMap - the options for this service
        Returns:
        a handle which may be used to cancel the pending operation
      • getSslSession

        SSLSession getSslSession()
        /** Get the underlying SSLSession for this connection if one is established.
        Returns:
        the SSLSession for the connection if one is established, otherwise returns null.
      • getRemoteEndpointName

        String getRemoteEndpointName()
        Get the name of the remote endpoint.
        Returns:
        the remote endpoint name
      • getLocalAddress

        SocketAddress getLocalAddress()
        Get the local address, if any.
        Returns:
        the local address, or null if there is none
      • getPeerAddress

        SocketAddress getPeerAddress()
        Get the peer address, if any.
        Returns:
        the peer address, or null if there is none
      • getPeerSaslServerName

        String getPeerSaslServerName()
        Get the SASL server name that the peer gives for itself.
        Returns:
        the SASL server name that the peer gives for itself (must not be null)
      • getLocalSaslServerName

        String getLocalSaslServerName()
        Get the local SASL server name that we have given to the peer.
        Returns:
        the local SASL server name that we have given to the peer (must not be null)
      • getLocalIdentity

        org.wildfly.security.auth.server.SecurityIdentity getLocalIdentity()
        Get the local identity corresponding to the peer authentication which was performed on this connection, if it is an incoming connection. Outbound connections may return null for this property.
        Returns:
        the local identity of a connection, or null if the connection has no local identity and no local security domain configuration
      • supportsRemoteAuth

        boolean supportsRemoteAuth()
        Determine if the connection handler supports the remote authentication protocol.
        Returns:
        true if remote authentication is supported, false otherwise
      • getOfferedMechanisms

        Set<String> getOfferedMechanisms()
        Get the available SASL mechanisms.
        Returns:
        the available SASL mechanisms
      • getPrincipal

        Principal getPrincipal()
        Get the principal used to authenticate the local client against the peer.
        Returns:
        the local client principal, or null if the connection is inbound
      • sendAuthRequest

        void sendAuthRequest​(int id,
                             String mechName,
                             byte[] initialResponse)
                      throws IOException
        Send an authentication request.
        Parameters:
        id - the ID number to use
        mechName - the mechanism name (not null)
        initialResponse - the initial response (possibly null)
        Throws:
        IOException - if a transmission error occurs
      • sendAuthChallenge

        void sendAuthChallenge​(int id,
                               byte[] challenge)
                        throws IOException
        Send an authentication challenge.
        Parameters:
        id - the ID number to use
        challenge - the challenge body (not null)
        Throws:
        IOException - if a transmission error occurs
      • sendAuthResponse

        void sendAuthResponse​(int id,
                              byte[] response)
                       throws IOException
        Send an authentication response.
        Parameters:
        id - the ID number to use
        response - the response body (not null)
        Throws:
        IOException - if a transmission error occurs
      • sendAuthSuccess

        void sendAuthSuccess​(int id,
                             byte[] challenge)
                      throws IOException
        Send an authentication complete message.
        Parameters:
        id - the ID number to use
        challenge - the final challenge (may be null if none is needed)
        Throws:
        IOException - if a transmission error occurs
      • sendAuthReject

        void sendAuthReject​(int id)
                     throws IOException
        Send an authentication reject message.
        Parameters:
        id - the ID number to use
        Throws:
        IOException - if a transmission error occurs
      • sendAuthDelete

        void sendAuthDelete​(int id)
                     throws IOException
        Send an authentication delete message.
        Parameters:
        id - the ID number to use
        Throws:
        IOException - if a transmission error occurs
      • sendAuthDeleteAck

        void sendAuthDeleteAck​(int id)
                        throws IOException
        Send an authentication delete acknowledgement message.
        Parameters:
        id - the ID number to use
        Throws:
        IOException - if a transmission error occurs