Package org.jboss.ejb.client
Class EJBReceiverInvocationContext
- java.lang.Object
-
- org.jboss.ejb.client.AbstractReceiverInvocationContext
-
- org.jboss.ejb.client.EJBReceiverInvocationContext
-
public final class EJBReceiverInvocationContext extends AbstractReceiverInvocationContext
The context used for an Enterprise Bean receiver to return the result of an invocation.- Author:
- David M. Lloyd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceEJBReceiverInvocationContext.ResultProducerA result producer for invocation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.wildfly.security.auth.client.AuthenticationContextgetAuthenticationContext()Get the authentication context of the request.EJBClientContextgetClientContext()EJBClientInvocationContextgetClientInvocationContext()Get the invocation context associated with this receiver invocation context.org.wildfly.discovery.DiscoverygetDiscovery()voidproceedAsynchronously()Indicate that the invocation should proceed asynchronously, if it isn't already.voidrequestCancelled()Indicate that the request was successfully cancelled and that no result is forthcoming.voidrequestFailed(Exception cause)Indicate that a request failed locally with the given exception cause.voidrequestFailed(Exception cause, Executor retryExecutor)Indicate that a request failed locally with the given exception cause.voidresultReady(EJBReceiverInvocationContext.ResultProducer resultProducer)Indicate that the invocation result is ready.StringtoString()
-
-
-
Method Detail
-
proceedAsynchronously
public void proceedAsynchronously()
Indicate that the invocation should proceed asynchronously, if it isn't already.
-
resultReady
public void resultReady(EJBReceiverInvocationContext.ResultProducer resultProducer)
Indicate that the invocation result is ready. The given producer should either return the final invocation result or throw an appropriate exception. Any unmarshalling is expected to be deferred until the result producer is called, in order to offload the work on the invoking thread even in the presence of asynchronous invocation.- Parameters:
resultProducer- the result producer
-
requestCancelled
public void requestCancelled()
Indicate that the request was successfully cancelled and that no result is forthcoming.
-
requestFailed
public void requestFailed(Exception cause)
Indicate that a request failed locally with the given exception cause. Retries are called in the current thread before this method returns.- Parameters:
cause- the failure cause (must not benull)
-
requestFailed
public void requestFailed(Exception cause, Executor retryExecutor)
Indicate that a request failed locally with the given exception cause.- Parameters:
cause- the failure cause (must not benull)retryExecutor- the executor to use for retry attempts (must not benull)
-
getClientInvocationContext
public EJBClientInvocationContext getClientInvocationContext()
Description copied from class:AbstractReceiverInvocationContextGet the invocation context associated with this receiver invocation context.- Specified by:
getClientInvocationContextin classAbstractReceiverInvocationContext- Returns:
- the invocation context
-
getClientContext
public EJBClientContext getClientContext()
-
getDiscovery
public org.wildfly.discovery.Discovery getDiscovery()
-
getAuthenticationContext
public org.wildfly.security.auth.client.AuthenticationContext getAuthenticationContext()
Description copied from class:AbstractReceiverInvocationContextGet the authentication context of the request. The configuration may be associated with the proxy, or it may have been inherited from the environment.- Specified by:
getAuthenticationContextin classAbstractReceiverInvocationContext- Returns:
- the authentication configuration of the request (not
null)
-
-