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 ClassesModifier and TypeInterfaceDescriptionstatic classDeprecated.Please use EJBClientContext.Builder to manipulate the EJBClientInterceptors. -
Method Summary
Modifier and TypeMethodDescriptionvoidHandle the invocation.Handle the invocation result.default SessionIDOptionally handle a session creation invocation.
-
Method Details
-
handleInvocation
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
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
-