org.jboss.remoting
Class ServerInvokerCallbackHandler

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

public class ServerInvokerCallbackHandler
extends java.lang.Object
implements InvokerCallbackHandler (src)

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


Field Summary
static java.lang.String CALLBACK_MEM_CEILING
          The map key to use when looking up the percentage of free memory available before tiggering persistence.
static java.lang.String CALLBACK_STORE_KEY
          The map key to use when looking up any callback store that should be used.
 
Constructor Summary
ServerInvokerCallbackHandler(InvocationRequest (src)  invocation, InvokerLocator (src)  serverLocator, ServerInvoker (src)  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 (src) getCallbackClient()
           
 java.util.List getCallbacks()
           
 java.lang.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 java.lang.String getId(InvocationRequest (src)  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.
 java.lang.Double getMemPercentCeiling()
           
 void handleCallback(InvocationRequest (src)  callback)
          Will take the callback message and send back to client.
 boolean isPullCallbackHandler()
           
 void setMemPercentCeiling(java.lang.Double ceiling)
           
 java.lang.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 java.lang.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 (src)

CALLBACK_MEM_CEILING

public static final java.lang.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 (src)
Constructor Detail

ServerInvokerCallbackHandler

public ServerInvokerCallbackHandler(InvocationRequest (src)  invocation,
                                    InvokerLocator (src)  serverLocator,
                                    ServerInvoker (src)  owner)
                             throws java.lang.Exception
Method Detail

setMemPercentCeiling

public void setMemPercentCeiling(java.lang.Double ceiling)

getMemPercentCeiling

public java.lang.Double getMemPercentCeiling()

getCallbackClient

public Client (src)  getCallbackClient()

getId

public static java.lang.String getId(InvocationRequest (src)  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 java.lang.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 java.util.List getCallbacks()

isPullCallbackHandler

public boolean isPullCallbackHandler()

handleCallback

public void handleCallback(InvocationRequest (src)  callback)
                    throws HandleCallbackException (src) 
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 (src)
Parameters:
callback -
Throws:
HandleCallbackException (src)

toString

public java.lang.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.