Package org.jboss.ejb.client
Interface EJBClientInterceptor
-
- All Known Implementing Classes:
AuthenticationContextEJBClientInterceptor
,DiscoveryEJBClientInterceptor
,NamingEJBClientInterceptor
,RemotingEJBClientInterceptor
,TransactionInterceptor
,TransactionPostDiscoveryInterceptor
public interface EJBClientInterceptor
An Enterprise Bean client interceptor, possibly protocol-specific. Client interceptors should not store any state locally since they are shared between all threads.Interceptors are generally applied in priority order. Priority is determined by configuration or by the presence of an
ClientInterceptorPriority
annotation on the interceptor class. If priorities are equal, then the following configuration order applies:- Annotation-declared method-level interceptors
- Annotation-declared class-level interceptors
- Method-level configuration-declared interceptors
- Class-level configuration-declared interceptors
- Global configuration-declared interceptors
- Interceptors found from class path
- Globally installed default interceptors
- Author:
- David M. Lloyd
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
EJBClientInterceptor.Registration
Deprecated.Please use EJBClientContext.Builder to manipulate the EJBClientInterceptors.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
handleInvocation(EJBClientInvocationContext context)
Handle the invocation.Object
handleInvocationResult(EJBClientInvocationContext context)
Handle the invocation result.default SessionID
handleSessionCreation(EJBSessionCreationInvocationContext context)
Optionally handle a session creation invocation.
-
-
-
Method Detail
-
handleInvocation
void handleInvocation(EJBClientInvocationContext context) throws Exception
Handle the invocation. Implementations may short-circuit the invocation by throwing an exception. This method should process any per-interceptor state and callEJBClientInvocationContext.sendRequest()
.- Parameters:
context
- the invocation context- Throws:
Exception
- if an invocation error occurs
-
handleInvocationResult
Object handleInvocationResult(EJBClientInvocationContext context) throws Exception
Handle the invocation result. The implementation should generally callEJBClientInvocationContext.getResult()
immediately and perform any post-invocation cleanup task in a finally block.- Parameters:
context
- the invocation context- Returns:
- the invocation result, if any
- Throws:
Exception
- if an invocation error occurred
-
handleSessionCreation
default SessionID handleSessionCreation(EJBSessionCreationInvocationContext context) throws Exception
Optionally handle a session creation invocation. Explicit session creation is always a blocking operation. The default operation forwards to the next interceptor in the chain.- Parameters:
context
- the session creation invocation context (notnull
)- Returns:
- the stateful Enterprise Beans locator (must not be
null
) - Throws:
Exception
- if an invocation error occurred
-
-