wt.feedback
Class WTContextUpdate

java.lang.Object
  extended bywt.feedback.WTContextUpdate
All Implemented Interfaces:
Externalizable, MethodFeedback, Serializable

public class WTContextUpdate
extends Object
implements MethodFeedback, Externalizable

Feedback object to carry updates to client's WTContext object. This class can be used by server-side methods to push updates to a client's WTContext as a side effect of performing an operation.

For example, if some client-side classes use the WTContext object to cache frequently used objects, server-side operations that change these objects can automatically push new values into the client's WTContext object. This is useful if the currently executing method does not normally carry such updated objects as part of its return value.

Supported API: true
Extendable: true

See Also:
Serialized Form

Field Summary
private  Object key
           
(package private) static long serialVersionUID
           
private  Object value
           
private static String versionID
           
 
Constructor Summary
WTContextUpdate()
          Public no-arg constructor required by Externalizable.
WTContextUpdate(Object key, Object value)
          Construct a new WTContextUpdate object.
 
Method Summary
 void execute()
          Perform feedback operation in client.
 void readExternal(ObjectInput input_stream)
          Called during marshaling on the client side.
 void writeExternal(ObjectOutput output_stream)
          Called during marshaling on the server side.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionID

private static final String versionID
See Also:
Constant Field Values

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

key

private Object key

value

private Object value
Constructor Detail

WTContextUpdate

public WTContextUpdate()
Public no-arg constructor required by Externalizable. This constructor is only used on the client-side when receiving the object.

Supported API: true


WTContextUpdate

public WTContextUpdate(Object key,
                       Object value)
Construct a new WTContextUpdate object.

Supported API: true

Parameters:
key - the hashtable key
value - the value
Method Detail

execute

public void execute()
Perform feedback operation in client. This method is automatically invoked when the feedback is received in the client's RMI reply marshalling stream. It has the effect of putting this objects key and value into the current thread's WTContext object.

Supported API: true

Specified by:
execute in interface MethodFeedback

readExternal

public void readExternal(ObjectInput input_stream)
                  throws IOException,
                         ClassNotFoundException
Called during marshaling on the client side.

Supported API: true

Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput output_stream)
                   throws IOException
Called during marshaling on the server side.

Supported API: true

Specified by:
writeExternal in interface Externalizable
Throws:
IOException