Package org.jboss.ejb.client
Class AbstractInvocationContext
java.lang.Object
org.jboss.ejb.client.Attachable
org.jboss.ejb.client.AbstractInvocationContext
- Direct Known Subclasses:
EJBClientInvocationContext,EJBSessionCreationInvocationContext
The base class of invocation contexts consumed by interceptors and receivers.
- Author:
- David M. Lloyd
-
Method Summary
Modifier and TypeMethodDescriptionorg.wildfly.security.auth.client.AuthenticationContextGet the Enterprise Beans client context associated with this invocation.Get the context data.Get the resolved destination of this invocation.Gets the initial cluster assignment by discovery, if anyEJBLocator<?>Get the locator for the invocation target.Get the resolved target affinity of this invocation.org.wildfly.transaction.client.AbstractTransactionGet the transaction associated with the invocation.Class<?>Get the invoked view class.Get the invocation weak affinity.abstract voidRequest that the current operation be retried if possible.voidsetDestination(URI destination) Set the resolved destination of this invocation.<T> voidsetLocator(EJBLocator<T> locator) Set the locator for the invocation target.voidsetTargetAffinity(Affinity targetAffinity) Set the resolved target affinity of this invocation.voidsetTransaction(org.wildfly.transaction.client.AbstractTransaction transaction) Set the transaction associated with the invocation.voidsetWeakAffinity(Affinity weakAffinity) Set the invocation weak affinity.Methods inherited from class org.jboss.ejb.client.Attachable
getAttachment, getAttachments, putAttachment, putAttachmentIfAbsent, removeAttachment, removeAttachment, replaceAttachment, replaceAttachment
-
Method Details
-
getInitialCluster
Gets the initial cluster assignment by discovery, if any- Returns:
- the initial cluster if assigned
-
getAuthenticationContext
public org.wildfly.security.auth.client.AuthenticationContext getAuthenticationContext() -
getClientContext
Get the Enterprise Beans client context associated with this invocation.- Returns:
- the Enterprise Beans client context
-
getContextData
Get the context data. This same data will be made available verbatim to server-side interceptors via theInvocationContext.getContextData()method, and thus can be used to pass data from the client to the server (as long as all map values areSerializable).- Returns:
- the context data
-
getLocator
Get the locator for the invocation target.- Returns:
- the locator
-
setLocator
Set the locator for the invocation target.- Parameters:
locator- the locator for the invocation target
-
getDestination
Get the resolved destination of this invocation. If the destination is not yet decided,nullis returned.- Returns:
- the resolved destination of this invocation, or
nullif it is not yet known
-
setDestination
Set the resolved destination of this invocation. The destination must be decided by the end of the interceptor chain, otherwise an exception will result.- Parameters:
destination- the resolved destination of this invocation
-
getTargetAffinity
Get the resolved target affinity of this invocation. If the target affinity is not yet decided,nullis returned. The target affinity is retained only for the lifetime of the invocation; it may be used to aid in resolving the destination to set.- Returns:
- the resolved target affinity of this invocation, or
nullif it is not yet known
-
setTargetAffinity
Set the resolved target affinity of this invocation.- Parameters:
targetAffinity- the resolved target affinity of this invocation
-
getWeakAffinity
Get the invocation weak affinity.- Returns:
- the invocation weak affinity, or
Affinity.NONEif none (notnull)
-
setWeakAffinity
Set the invocation weak affinity.- Parameters:
weakAffinity- the invocation weak affinity (must not benull)
-
getViewClass
Get the invoked view class.- Returns:
- the invoked view class
-
requestRetry
public abstract void requestRetry()Request that the current operation be retried if possible. -
getTransaction
public org.wildfly.transaction.client.AbstractTransaction getTransaction()Get the transaction associated with the invocation. If there is no transaction (i.e. transactions should not be propagated),nullis returned.- Returns:
- the transaction associated with the invocation, or
nullif no transaction should be propagated
-
setTransaction
public void setTransaction(org.wildfly.transaction.client.AbstractTransaction transaction) Set the transaction associated with the invocation. If there is no transaction (i.e. transactions should not be propagated),nullshould be set.- Parameters:
transaction- the transaction associated with the invocation, ornullif no transaction should be propagated
-