org.jboss.remoting
Class ServerInvokerCallbackHandler

java.lang.Object
  extended byorg.jboss.remoting.ServerInvokerCallbackHandler
All Implemented Interfaces:
InvokerCallbackHandler

public class ServerInvokerCallbackHandler
extends Object
implements InvokerCallbackHandler

Responsible for all callbacks in remoting at invoker level (on the server side).

Author:
Tom Elrod

Field Summary
static String CALLBACK_MEM_CEILING
          The map key to use when looking up the percentage of free memory available before tiggering persistence.
static String CALLBACK_STORE_KEY
          The map key to use when looking up any callback store that should be used.
 
Constructor Summary
ServerInvokerCallbackHandler(InvocationRequest invocation, InvokerLocator serverLocator, ServerInvoker owner)
           
 
Method Summary
 void destroy()
          This method is required to be called upon removing a callback listener so can clean up resources used by the handler.
 Client getCallbackClient()
           
 List getCallbacks()
           
 String getId()
          Returns an id that can be used to identify this particular callback handler, which should be representative of the client invoker it will make callbacks to.
static String getId(InvocationRequest invocation)
          Returns an id that can be used to identify this particular callback handler, which should be representative of the client invoker it will make callbacks to.
 Double getMemPercentCeiling()
           
 void handleCallback(InvocationRequest callback)
          Will take the callback message and send back to client.
 boolean isPullCallbackHandler()
           
 void setMemPercentCeiling(Double ceiling)
           
 String toString()
          Returns the id for this handler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CALLBACK_STORE_KEY

public static final String CALLBACK_STORE_KEY
The map key to use when looking up any callback store that should be used. This key should be used when setting up config in the invoker.

See Also:
Constant Field Values

CALLBACK_MEM_CEILING

public static final String CALLBACK_MEM_CEILING
The map key to use when looking up the percentage of free memory available before tiggering persistence.

See Also:
Constant Field Values
Constructor Detail

ServerInvokerCallbackHandler

public ServerInvokerCallbackHandler(InvocationRequest invocation,
                                    InvokerLocator serverLocator,
                                    ServerInvoker owner)
                             throws Exception
Method Detail

setMemPercentCeiling

public void setMemPercentCeiling(Double ceiling)

getMemPercentCeiling

public Double getMemPercentCeiling()

getCallbackClient

public Client getCallbackClient()

getId

public static String getId(InvocationRequest invocation)
Returns an id that can be used to identify this particular callback handler, which should be representative of the client invoker it will make callbacks to. Currently, this is the session id associated with the invocation request.

Returns:

getId

public String getId()
Returns an id that can be used to identify this particular callback handler, which should be representative of the client invoker it will make callbacks to.

Returns:

getCallbacks

public List getCallbacks()

isPullCallbackHandler

public boolean isPullCallbackHandler()

handleCallback

public void handleCallback(InvocationRequest callback)
                    throws HandleCallbackException
Will take the callback message and send back to client. If client locator is null, will store them till client polls to get them.

Specified by:
handleCallback in interface InvokerCallbackHandler
Parameters:
callback -
Throws:
HandleCallbackException

toString

public String toString()
Returns the id for this handler

Returns:

destroy

public void destroy()
This method is required to be called upon removing a callback listener so can clean up resources used by the handler. In particular, should call disconnect on internal Client.



Copyright © 2004 JBoss Inc. All Rights Reserved.