Package org.jboss.ejb.client
Class DiscoveryEJBClientInterceptor
java.lang.Object
org.jboss.ejb.client.DiscoveryEJBClientInterceptor
- All Implemented Interfaces:
EJBClientInterceptor
The Enterprise Beans client interceptor responsible for discovering the destination of a request. If a destination is already
established, the interceptor passes the invocation through unmodified. If the interceptor cannot locate the
destination, the invocation will proceed without a destination (and ultimately fail if no other interceptor
resolves the destination).
- Author:
- David M. Lloyd
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.ejb.client.EJBClientInterceptor
EJBClientInterceptor.Registration -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longGets the value (in milliseconds) of discovery additional timeout, configured with system propertyorg.jboss.ejb.client.discovery.additional-node-timeout.voidHandle the invocation.Handle the invocation result.Optionally handle a session creation invocation.
-
Field Details
-
PRIORITY
public static final int PRIORITYThis interceptor's priority.- See Also:
-
-
Constructor Details
-
DiscoveryEJBClientInterceptor
public DiscoveryEJBClientInterceptor()Construct a new instance.
-
-
Method Details
-
handleInvocation
Description copied from interface:EJBClientInterceptorHandle the invocation. Implementations may short-circuit the invocation by throwing an exception. This method should process any per-interceptor state and callEJBClientInvocationContext.sendRequest().- Specified by:
handleInvocationin interfaceEJBClientInterceptor- Parameters:
context- the invocation context- Throws:
Exception- if an invocation error occurs
-
handleInvocationResult
Description copied from interface:EJBClientInterceptorHandle the invocation result. The implementation should generally callEJBClientInvocationContext.getResult()immediately and perform any post-invocation cleanup task in a finally block.- Specified by:
handleInvocationResultin interfaceEJBClientInterceptor- Parameters:
context- the invocation context- Returns:
- the invocation result, if any
- Throws:
Exception- if an invocation error occurred
-
handleSessionCreation
public SessionID handleSessionCreation(EJBSessionCreationInvocationContext context) throws Exception Description copied from interface:EJBClientInterceptorOptionally handle a session creation invocation. Explicit session creation is always a blocking operation. The default operation forwards to the next interceptor in the chain.- Specified by:
handleSessionCreationin interfaceEJBClientInterceptor- 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
-
getDiscoveryAdditionalTimeout
public static long getDiscoveryAdditionalTimeout()Gets the value (in milliseconds) of discovery additional timeout, configured with system propertyorg.jboss.ejb.client.discovery.additional-node-timeout.- Returns:
- the value (in milliseconds) of discovery additional timeout
-