Interface Endpoint

    • Field Detail

      • ENDPOINT_CONTEXT_MANAGER

        static final org.wildfly.common.context.ContextManager<Endpoint> ENDPOINT_CONTEXT_MANAGER
        The context manager for Remoting endpoints.
    • Method Detail

      • getInstanceContextManager

        default org.wildfly.common.context.ContextManager<Endpoint> getInstanceContextManager()
        Get the context manager for Remoting endpoints (ENDPOINT_CONTEXT_MANAGER).
        Specified by:
        getInstanceContextManager in interface org.wildfly.common.context.Contextual<Endpoint>
        Returns:
        the context manager for Remoting endpoints (not null)
      • getCurrent

        static Endpoint getCurrent()
        Get the currently active Remoting endpoint. If none is selected, null is returned.
        Returns:
        the currently active Remoting endpoint, or null if none
      • getName

        String getName()
        Get the name of this endpoint.
        Returns:
        the endpoint name, or null if there is no name
      • registerService

        Registration registerService​(String serviceType,
                                     OpenListener openListener,
                                     org.xnio.OptionMap optionMap)
                              throws ServiceRegistrationException
        Register a new service.
        Parameters:
        serviceType - the service type
        openListener - the channel open listener
        optionMap - the option map
        Returns:
        the service registration which may be closed to remove the service
        Throws:
        ServiceRegistrationException - if the service could not be registered
      • getConnectedIdentity

        default org.xnio.IoFuture<ConnectionPeerIdentity> getConnectedIdentity​(URI destination,
                                                                               String abstractType,
                                                                               String abstractTypeAuthority,
                                                                               org.wildfly.security.auth.client.AuthenticationContext context)
        Get a possibly shared, possibly existing connection to the destination. The authentication and SSL configuration is selected from the given context with the given abstract type (if specified).
        Parameters:
        destination - the destination URI (must not be null)
        abstractType - the abstract type of the connection (may be null)
        abstractTypeAuthority - the authority name of the abstract type of the connection (may be null)
        context - the authentication context to use (must not be null)
        Returns:
        the future connection identity (not null)
      • getConnectedIdentity

        default org.xnio.IoFuture<ConnectionPeerIdentity> getConnectedIdentity​(URI destination,
                                                                               String abstractType,
                                                                               String abstractTypeAuthority)
        Get a possibly shared, possibly existing connection to the destination. The authentication and SSL configuration is selected from the currently active authentication context with the given abstract type (if specified).
        Parameters:
        destination - the destination URI (must not be null)
        abstractType - the abstract type of the connection (may be null)
        abstractTypeAuthority - the authority name of the abstract type of the connection (may be null)
        Returns:
        the future connection identity (not null)
      • getConnectedIdentity

        org.xnio.IoFuture<ConnectionPeerIdentity> getConnectedIdentity​(URI destination,
                                                                       SSLContext sslContext,
                                                                       org.wildfly.security.auth.client.AuthenticationConfiguration authenticationConfiguration)
        Get a possibly shared, possibly existing connection to the destination. The authentication and SSL configuration is specified directly.
        Parameters:
        destination - the destination URI (must not be null)
        sslContext - the SSL context to use for secure connections (may be null)
        authenticationConfiguration - the authentication configuration to use (must not be null)
        Returns:
        the future connection identity (not null)
      • getConnectedIdentityIfExists

        default org.xnio.IoFuture<ConnectionPeerIdentity> getConnectedIdentityIfExists​(URI destination,
                                                                                       String abstractType,
                                                                                       String abstractTypeAuthority,
                                                                                       org.wildfly.security.auth.client.AuthenticationContext context)
        Get a possibly shared, possibly existing connection to the destination, if the connection was already established. The authentication and SSL configuration is specified directly.

        If no existing connection was found, null is returned. If a non-null IoFuture is returned, it may represent a complete connection, a failed attempt, or an in-progress attempt.

        Parameters:
        destination - the destination URI (must not be null)
        abstractType - the abstract type of the connection (may be null)
        abstractTypeAuthority - the authority name of the abstract type of the connection (may be null)
        context - the authentication context to use (must not be null)
        Returns:
        the existing connection, or null if no connection currently exists
      • getConnectedIdentityIfExists

        org.xnio.IoFuture<ConnectionPeerIdentity> getConnectedIdentityIfExists​(URI destination,
                                                                               SSLContext sslContext,
                                                                               org.wildfly.security.auth.client.AuthenticationConfiguration authenticationConfiguration)
        Get a possibly shared, possibly existing connection to the destination, if the connection was already established. The authentication and SSL configuration is specified directly.

        If no existing connection was found, null is returned. If a non-null IoFuture is returned, it may represent a complete connection, a failed attempt, or an in-progress attempt.

        Parameters:
        destination - the destination URI (must not be null)
        sslContext - the SSL context to use for secure connections (may be null)
        authenticationConfiguration - the authentication configuration to use (must not be null)
        Returns:
        the existing connection, or null if no connection currently exists
      • getConnection

        @Deprecated
        default org.xnio.IoFuture<Connection> getConnection​(URI destination)
        Deprecated.
        Get a possibly pre-existing connection to the destination.
        Parameters:
        destination - the destination URI
        Returns:
        the future (or existing) connection
      • getConnection

        @Deprecated
        default org.xnio.IoFuture<Connection> getConnection​(URI destination,
                                                            String abstractType,
                                                            String abstractTypeAuthority)
        Deprecated.
        Get a possibly pre-existing connection to the destination. The given abstract type and authority are used to locate the authentication configuration.
        Parameters:
        destination - the destination URI (must not be null)
        abstractType - the abstract type of the connection (may be null)
        abstractTypeAuthority - the authority name of the abstract type of the connection (may be null)
        Returns:
        the future (or existing) connection
      • getConnection

        @Deprecated
        default org.xnio.IoFuture<Connection> getConnection​(URI destination,
                                                            SSLContext sslContext,
                                                            org.wildfly.security.auth.client.AuthenticationConfiguration authenticationConfiguration)
        Deprecated.
        Get a possibly pre-existing connection to the destination. The given authentication configuration is used to authenticate the connection.

        The given SSL context factory is used only for TLS-based protocols. It may be null, but in such cases, no TLS-based protocols will be available.

        Parameters:
        destination - the destination URI (must not be null)
        sslContext - the SSL context to use for secure connections (may be null)
        authenticationConfiguration - the authentication configuration to use (must not be null)
        Returns:
        the future (or existing) connection
      • getConnection

        @Deprecated
        default org.xnio.IoFuture<Connection> getConnection​(URI destination,
                                                            SSLContext sslContext,
                                                            org.wildfly.security.auth.client.AuthenticationConfiguration connectionConfiguration,
                                                            org.wildfly.security.auth.client.AuthenticationConfiguration operateConfiguration)
        Deprecated.
        Get a possibly pre-existing connection to the destination. The connection authentication configuration is used to authenticate the peer if the connection supports multiple identity switching. The run authentication configuration is used to authenticate the peer if the connection does not support multiple identity switching.
        Parameters:
        destination - the destination URI (must not be null)
        sslContext - the SSL context to use for secure connections (may be null)
        connectionConfiguration - the connection authentication configuration (must not be null)
        operateConfiguration - the run authentication configuration (must not be null)
        Returns:
        the future (or existing) connection
      • getConnectionIfExists

        @Deprecated
        default org.xnio.IoFuture<Connection> getConnectionIfExists​(URI destination,
                                                                    SSLContext sslContext,
                                                                    org.wildfly.security.auth.client.AuthenticationConfiguration connectionConfiguration,
                                                                    org.wildfly.security.auth.client.AuthenticationConfiguration operateConfiguration)
        Deprecated.
        Get a pre-existing connection to the destination. The connection authentication configuration is used to authenticate the peer if the connection supports multiple identity switching. The run authentication configuration is used to authenticate the peer if the connection does not support multiple identity switching.

        If no existing connection was found, null is returned. If a non-null IoFuture is returned, it may represent a complete connection, a failed attempt, or an in-progress attempt.

        Parameters:
        destination - the destination URI (must not be null)
        sslContext - the SSL context to use for secure connections (may be null)
        connectionConfiguration - the connection authentication configuration (must not be null)
        operateConfiguration - the run authentication configuration (must not be null)
        Returns:
        the existing connection, or null if no connection currently exists
      • getConnectionIfExists

        @Deprecated
        default org.xnio.IoFuture<Connection> getConnectionIfExists​(URI destination,
                                                                    String abstractType,
                                                                    String abstractTypeAuthority)
        Deprecated.
        Get a pre-existing connection to the destination.

        If no existing connection was found, null is returned. If a non-null IoFuture is returned, it may represent a complete connection, a failed attempt, or an in-progress attempt.

        Parameters:
        destination - the destination URI (must not be null)
        abstractType - the abstract type of the connection (may be null)
        abstractTypeAuthority - the authority name of the abstract type of the connection (may be null)
        Returns:
        the existing connection, or null if no connection currently exists
      • getConnectionIfExists

        @Deprecated
        default org.xnio.IoFuture<Connection> getConnectionIfExists​(URI destination)
        Deprecated.
        Get a pre-existing shared connection to the destination.

        If no existing connection was found, null is returned. If a non-null IoFuture is returned, it may represent a complete connection, a failed attempt, or an in-progress attempt.

        Parameters:
        destination - the destination URI (must not be null)
        Returns:
        the existing connection, or null if no connection currently exists
      • connect

        default org.xnio.IoFuture<Connection> connect​(URI destination)
        Open an unshared connection with a peer. Returns a future connection which may be used to cancel the connection attempt. This method does not block; use the return value to wait for a result if you wish to block.

        You must have the connect EndpointPermission to invoke this method.

        Parameters:
        destination - the destination
        Returns:
        the future connection
      • connect

        org.xnio.IoFuture<Connection> connect​(URI destination,
                                              org.xnio.OptionMap connectOptions)
        Open an unshared connection with a peer. Returns a future connection which may be used to cancel the connection attempt. This method does not block; use the return value to wait for a result if you wish to block.

        You must have the connect EndpointPermission to invoke this method.

        Parameters:
        destination - the destination
        connectOptions - options to configure this connection
        Returns:
        the future connection
      • connect

        org.xnio.IoFuture<Connection> connect​(URI destination,
                                              org.xnio.OptionMap connectOptions,
                                              org.wildfly.security.auth.client.AuthenticationContext authenticationContext)
        Open an unshared connection with a peer. Returns a future connection which may be used to cancel the connection attempt. This method does not block; use the return value to wait for a result if you wish to block.

        You must have the connect EndpointPermission to invoke this method.

        Parameters:
        destination - the destination
        connectOptions - options to configure this connection
        authenticationContext - the client authentication context to use
        Returns:
        the future connection
      • connect

        org.xnio.IoFuture<Connection> connect​(URI destination,
                                              InetSocketAddress bindAddress,
                                              org.xnio.OptionMap connectOptions,
                                              org.wildfly.security.auth.client.AuthenticationContext authenticationContext)
        Open an unshared connection with a peer. Returns a future connection which may be used to cancel the connection attempt. This method does not block; use the return value to wait for a result if you wish to block.

        You must have the connect EndpointPermission to invoke this method.

        Parameters:
        destination - the destination
        bindAddress - the local bind address
        connectOptions - options to configure this connection
        authenticationContext - the client authentication context to use
        Returns:
        the future connection
      • connect

        org.xnio.IoFuture<Connection> connect​(URI destination,
                                              InetSocketAddress bindAddress,
                                              org.xnio.OptionMap connectOptions,
                                              SSLContext sslContext,
                                              org.wildfly.security.auth.client.AuthenticationConfiguration connectionConfiguration)
        Open an unshared connection with a peer. Returns a future connection which may be used to cancel the connection attempt. This method does not block; use the return value to wait for a result if you wish to block.

        You must have the connect EndpointPermission to invoke this method.

        Parameters:
        destination - the destination
        bindAddress - the local bind address
        connectOptions - options to configure this connection
        sslContext - the SSL context to use for secure connections (may be null)
        connectionConfiguration - the connection authentication configuration (must not be null)
        Returns:
        the future connection (not null)
      • connect

        @Deprecated
        org.xnio.IoFuture<Connection> connect​(URI destination,
                                              org.xnio.OptionMap connectOptions,
                                              CallbackHandler callbackHandler)
                                       throws IOException
        Deprecated.
        Open an unshared connection with a peer. Returns a future connection which may be used to cancel the connection attempt. This method does not block; use the return value to wait for a result if you wish to block.

        You must have the connect EndpointPermission to invoke this method.

        Parameters:
        destination - the destination
        connectOptions - options to configure this connection
        callbackHandler - the local callback handler to use for authentication
        Returns:
        the future connection (not null)
        Throws:
        IOException
      • isValidUriScheme

        boolean isValidUriScheme​(String uriScheme)
        Determine whether the given URI scheme is valid for this endpoint.
        Parameters:
        uriScheme - the URI scheme
        Returns:
        true if the URI scheme is valid at the time this method is called
      • getXnioWorker

        org.xnio.XnioWorker getXnioWorker()
        Get the XNIO worker configured for this endpoint.
        Returns:
        the XNIO worker
      • builder

        static EndpointBuilder builder()
        Create a new endpoint builder.
        Returns:
        the new endpoint builder