org.directwebremoting.extend
Class CallbackHelper

java.lang.Object
  extended by org.directwebremoting.extend.CallbackHelper

public class CallbackHelper
extends java.lang.Object

A class to help with the use of Callbacks

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Field Summary
static java.lang.String KEY_CALLBACK
          The key that we use in a script session to store Callbacks
static java.lang.String KEY_TYPE
          The key that we use in a script session to store Callbacks
 
Constructor Summary
CallbackHelper()
           
 
Method Summary
static java.lang.String createUniqueId()
          Callbacks need a unique ID
static
<T> void
executeCallback(java.lang.String key, RawData data)
          The reverse of saveCallback(Callback, Class) which executes a Callback which has been
static
<T> java.lang.String
saveCallback(Callback<T> callback, java.lang.Class<T> type)
          Used by the many proxy classes to record a callback for later calling
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_CALLBACK

public static final java.lang.String KEY_CALLBACK
The key that we use in a script session to store Callbacks

See Also:
Constant Field Values

KEY_TYPE

public static final java.lang.String KEY_TYPE
The key that we use in a script session to store Callbacks

See Also:
Constant Field Values
Constructor Detail

CallbackHelper

public CallbackHelper()
Method Detail

saveCallback

public static <T> java.lang.String saveCallback(Callback<T> callback,
                                                java.lang.Class<T> type)
Used by the many proxy classes to record a callback for later calling

Parameters:
callback - The callback that acts on the type
type - The type of the data that we are recording
Returns:
A key under which the data is stored

executeCallback

public static <T> void executeCallback(java.lang.String key,
                                       RawData data)
                            throws MarshallException
The reverse of saveCallback(Callback, Class) which executes a Callback which has been

Parameters:
key -
data -
Throws:
MarshallException

createUniqueId

public static java.lang.String createUniqueId()
Callbacks need a unique ID


Copyright ¬ 2005