JBoss EJB client 1.0.5.Final

org.jboss.ejb.client
Class EJBReceiverInvocationContext

java.lang.Object
  extended by org.jboss.ejb.client.EJBReceiverInvocationContext

public final class EJBReceiverInvocationContext
extends Object

The context used for an EJB receiver to return the result of an invocation.

Author:
David M. Lloyd

Nested Class Summary
static interface EJBReceiverInvocationContext.ResultProducer
          A result producer for invocation.
 
Method Summary
 EJBClientInvocationContext getClientInvocationContext()
          Returns the EJBClientInvocationContext associated with this EJB receiver invocation context
 EJBReceiverContext getEjbReceiverContext()
          Get the associated EJB receiver context.
 String getNodeName()
          Returns the node name of the receiver represented by this EJBReceiverInvocationContext
 void proceedAsynchronously()
          Indicate that the invocation should proceed asynchronously, if it isn't already.
 void requestCancelled()
          Indicate that the request was successfully cancelled and that no result is forthcoming.
 void resultReady(EJBReceiverInvocationContext.ResultProducer resultProducer)
          Indicate that the invocation result is ready.
 void retryInvocation(boolean excludeCurrentReceiver)
          Retry the current invocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getEjbReceiverContext

public EJBReceiverContext getEjbReceiverContext()
Get the associated EJB receiver context.

Returns:
the EJB receiver context

getClientInvocationContext

public EJBClientInvocationContext getClientInvocationContext()
Returns the EJBClientInvocationContext associated with this EJB receiver invocation context

Returns:

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.


retryInvocation

public void retryInvocation(boolean excludeCurrentReceiver)
                     throws Exception
Retry the current invocation

Parameters:
excludeCurrentReceiver - True if the EJBReceiver represented by this EJBReceiverInvocationContext has to be excluded from being chosen for handling the retried invocation. False otherwise.
Throws:
Exception - If the retried invocation runs into any exception

getNodeName

public String getNodeName()
Returns the node name of the receiver represented by this EJBReceiverInvocationContext

Returns:

JBoss EJB client 1.0.5.Final

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.