Package org.wildfly.naming.client.remote
Class RemoteNamingProvider
- java.lang.Object
-
- org.wildfly.naming.client.remote.RemoteNamingProvider
-
- All Implemented Interfaces:
AutoCloseable,NamingProvider
public final class RemoteNamingProvider extends Object implements NamingProvider
A provider for JBoss Remoting-based JNDI contexts. Any scheme which uses JBoss Remoting using this provider will share a connection and a captured security context.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jboss.remoting3.EndpointgetEndpoint()Get the Remoting endpoint for this provider.org.xnio.IoFuture<org.jboss.remoting3.ConnectionPeerIdentity>getFuturePeerIdentity(URI location)Get the future connection peer identity.org.jboss.remoting3.ConnectionPeerIdentitygetPeerIdentity(URI location)Get the connection peer identity.org.jboss.remoting3.ConnectionPeerIdentitygetPeerIdentityForNaming()Get the connection peer identity for a naming operation.org.jboss.remoting3.ConnectionPeerIdentitygetPeerIdentityForNaming(URI location)Get the connection peer identity for a naming operation.org.jboss.remoting3.ConnectionPeerIdentitygetPeerIdentityForNamingUsingRetry(RetryContext context)Get a peer identity to use for context operations, retrying on failure.ProviderEnvironmentgetProviderEnvironment()Get the provider environment.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.naming.client.NamingProvider
close, performAction, performExceptionAction, performExceptionAction, throwNoMoreDestinationsException
-
-
-
-
Method Detail
-
getEndpoint
public org.jboss.remoting3.Endpoint getEndpoint()
Get the Remoting endpoint for this provider.- Returns:
- the Remoting endpoint for this provider (not
null)
-
getProviderEnvironment
public ProviderEnvironment getProviderEnvironment()
Description copied from interface:NamingProviderGet the provider environment.- Specified by:
getProviderEnvironmentin interfaceNamingProvider- Returns:
- the provider environment (must not be
null)
-
getPeerIdentityForNaming
public org.jboss.remoting3.ConnectionPeerIdentity getPeerIdentityForNaming() throws NamingExceptionGet the connection peer identity for a naming operation. If the connection is not configured asimmediate, then the connection will not actually be established until this method is called. The resultant connection should be closed and discarded in the event of an error, in order to facilitate automatic reconnection.- Specified by:
getPeerIdentityForNamingin interfaceNamingProvider- Returns:
- the connection peer identity (not
null) - Throws:
NamingException- if connecting, authenticating, or re-authenticating the peer failed
-
getPeerIdentityForNamingUsingRetry
public org.jboss.remoting3.ConnectionPeerIdentity getPeerIdentityForNamingUsingRetry(RetryContext context) throws NamingException
Description copied from interface:NamingProviderGet a peer identity to use for context operations, retrying on failure. The identity may be fixed or it may vary, depending on the context configuration. If the provider has multiple locations, a location is randomly selected. If the retry context is null, a retry will not occur.- Specified by:
getPeerIdentityForNamingUsingRetryin interfaceNamingProvider- Parameters:
context- the retry context for storing state required when retrying- Returns:
- the peer identity to use (must not be
null) - Throws:
NamingException- if connecting, authenticating, or re-authenticating the peer failed
-
getPeerIdentityForNaming
public org.jboss.remoting3.ConnectionPeerIdentity getPeerIdentityForNaming(URI location) throws NamingException
Get the connection peer identity for a naming operation. If the connection is not configured asimmediate, then the connection will not actually be established until this method is called. The resultant connection should be closed and discarded in the event of an error, in order to facilitate automatic reconnection.- Specified by:
getPeerIdentityForNamingin interfaceNamingProvider- Parameters:
location- a location fromProviderEnvironment.getProviderUris()(must not benull)- Returns:
- the connection peer identity (not
null) - Throws:
NamingException- if connecting, authenticating, or re-authenticating the peer failed
-
getPeerIdentity
public org.jboss.remoting3.ConnectionPeerIdentity getPeerIdentity(URI location) throws IOException
Get the connection peer identity. If the connection is not configured asimmediate, then the connection will not actually be established until this method is called. The resultant connection should be closed and discarded in the event of an error, in order to facilitate automatic reconnection.- Parameters:
location- a location fromProviderEnvironment.getProviderUris()(must not benull)- Returns:
- the connection peer identity (not
null) - Throws:
org.wildfly.security.auth.AuthenticationException- if authenticating or re-authenticating the peer failedIOException- if connecting the peer failed
-
getFuturePeerIdentity
public org.xnio.IoFuture<org.jboss.remoting3.ConnectionPeerIdentity> getFuturePeerIdentity(URI location)
Get the future connection peer identity. If the connection is not configured asimmediate, then the connection will not actually be established until this method is called. The resultant connection should be closed and discarded in the event of an error, in order to facilitate automatic reconnection.- Parameters:
location- a location fromProviderEnvironment.getProviderUris()(must not benull)- Returns:
- the future connection peer identity (not
null)
-
-