public interface NamingProvider extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
default void |
close()
Close the provider.
|
static NamingProvider |
getCurrentNamingProvider()
Get the current naming provider being used for the current deserialization operation.
|
default PeerIdentity |
getPeerIdentityForNaming()
Get a peer identity to use for context operations.
|
PeerIdentity |
getPeerIdentityForNaming(URI location)
Get the peer identity to use for context operations for the specified location.
|
default PeerIdentity |
getPeerIdentityForNamingUsingRetry(RetryContext context)
Get a peer identity to use for context operations, retrying on failure.
|
ProviderEnvironment |
getProviderEnvironment()
Get the provider environment.
|
default <T,U,R> R |
performAction(BiFunction<T,U,R> function,
T arg1,
U arg2)
Perform an action under the current naming provider.
|
default <T,U,R,E extends Exception> |
performExceptionAction(org.wildfly.common.function.ExceptionBiFunction<T,U,R,E> function,
T arg1,
U arg2)
Perform an action under the current naming provider.
|
default <T,R> R |
performExceptionAction(NamingOperation<T,R> function,
RetryContext contextOrNull,
Name name,
T param)
Perform an action under the current naming provider.
|
default void |
throwNoMoreDestinationsException(RetryContext context)
Throws either an
ExhaustedDestinationsException
utilizing the information passed in the specified
RetryContext, or an explicit exception mandated by the
context. |
ProviderEnvironment getProviderEnvironment()
null)default PeerIdentity getPeerIdentityForNaming() throws NamingException
null)NamingException - if connecting, authenticating, or re-authenticating the peer faileddefault PeerIdentity getPeerIdentityForNamingUsingRetry(RetryContext context) throws NamingException
context - the retry context for storing state required when retryingnull)NamingException - if connecting, authenticating, or
re-authenticating the peer faileddefault void throwNoMoreDestinationsException(RetryContext context) throws NamingException
ExhaustedDestinationsException
utilizing the information passed in the specified
RetryContext, or an explicit exception mandated by the
context.context - the current retry context of this invocationExhaustedDestinationsException - if no explicit exception is specifiedNamingException - if explicity requiredRuntimeException - if explicity requiredPeerIdentity getPeerIdentityForNaming(URI location) throws NamingException
ProviderEnvironment.getProviderUris().location - a location from ProviderEnvironment.getProviderUris() (must not be null)null)NamingException - if connecting, authenticating, or re-authenticating the peer failedstatic NamingProvider getCurrentNamingProvider()
null if no provider-related deserialization is occurringdefault <T,U,R> R performAction(BiFunction<T,U,R> function, T arg1, U arg2)
T - the first argument typeU - the second argument typeR - the function return typefunction - the function to apply (must not be null)arg1 - the first argumentarg2 - the second argumentdefault <T,U,R,E extends Exception> R performExceptionAction(org.wildfly.common.function.ExceptionBiFunction<T,U,R,E> function, T arg1, U arg2) throws E extends Exception
T - the first argument typeU - the second argument typeR - the function return typeE - the function exception typefunction - the function to apply (must not be null)arg1 - the first argumentarg2 - the second argumentE - if the function throws an exception of the given typeE extends Exceptiondefault <T,R> R performExceptionAction(NamingOperation<T,R> function, RetryContext contextOrNull, Name name, T param) throws NamingException
T - the first argument typeR - the function return typefunction - the function to apply (must not be null)NamingExceptiondefault void close()
throws NamingException
InitialContext is closed. This method
should be idempotent.close in interface AutoCloseableNamingException - if an error occurred while closing this providerCopyright © 2017 JBoss by Red Hat. All rights reserved.