Package org.jboss.remoting3.spi
Interface ConnectionProvider
-
- All Superinterfaces:
AutoCloseable
,Closeable
,HandleableCloseable<ConnectionProvider>
public interface ConnectionProvider extends HandleableCloseable<ConnectionProvider>
A connection provider. Used to establish connections with remote systems. There is typically one instance of this interface per connection provider factory per endpoint.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.remoting3.HandleableCloseable
HandleableCloseable.Key
-
-
Field Summary
Fields Modifier and Type Field Description static Object
NO_PROVIDER_INTERFACES
The object to use when a connection provider has no provider interfaces.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.xnio.Cancellable
connect(URI destination, SocketAddress bindAddress, org.xnio.OptionMap connectOptions, org.xnio.Result<ConnectionHandlerFactory> result, org.wildfly.security.auth.client.AuthenticationConfiguration authenticationConfiguration, SSLContext sslContext, UnaryOperator<SaslClientFactory> saslClientFactoryOperator, Collection<String> serverMechs)
Open an outbound connection, using the (optionally) given socket addresses as source and destination.Object
getProviderInterface()
Get the user data associated with this connection provider.-
Methods inherited from interface org.jboss.remoting3.HandleableCloseable
addCloseHandler, awaitClosed, awaitClosedUninterruptibly, close, closeAsync, isOpen
-
-
-
-
Field Detail
-
NO_PROVIDER_INTERFACES
static final Object NO_PROVIDER_INTERFACES
The object to use when a connection provider has no provider interfaces.
-
-
Method Detail
-
connect
org.xnio.Cancellable connect(URI destination, SocketAddress bindAddress, org.xnio.OptionMap connectOptions, org.xnio.Result<ConnectionHandlerFactory> result, org.wildfly.security.auth.client.AuthenticationConfiguration authenticationConfiguration, SSLContext sslContext, UnaryOperator<SaslClientFactory> saslClientFactoryOperator, Collection<String> serverMechs)
Open an outbound connection, using the (optionally) given socket addresses as source and destination. This method is expected to be non-blocking, with the result stored in the result variable possibly asynchronously.- Parameters:
destination
- the destination URI, ornull
if none is givenbindAddress
- the address to bind to, ornull
if none is givenconnectOptions
- the options to use for this connectionresult
- the result which should receive the connectionauthenticationConfiguration
- the configuration to use for authentication of the connectionsslContext
- the SSL context to usesaslClientFactoryOperator
- A unary operator to apply to the SaslClientFactory used.serverMechs
- the list of server mechanism names to advertise to the peer (may be empty; notnull
)- Returns:
- a handle which may be used to cancel the connect attempt
- Throws:
IllegalArgumentException
- if any of the given arguments are not valid for this protocol
-
getProviderInterface
Object getProviderInterface()
Get the user data associated with this connection provider. This object should implement all of the provider interfaces which are supported by this provider. Must not returnnull
.- Returns:
- the user data (not
null
) - See Also:
NetworkServerProvider
-
-