wt.feedback
Class StatusFeedback

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

public class StatusFeedback
extends Object
implements MethodFeedback, Externalizable

Feedback object to carry status messages to client. This class can be used by server-side emthods to push status messages to a client while an operation is being performed.

This class implements Externalizable as a performance improvement over Serializable.

If any of the elements in the textInserts array is itself an array, then the implementation will use the multi-object WTMessage.getMessages(String,String,Object[]) API to generate a multi-object status message.

Supported API: true
Extendable: true

See Also:
Serialized Form

Field Summary
private  String messageKey
           
private  String resourceBundle
           
(package private) static long serialVersionUID
           
private  String status
           
private  Object[] textInserts
           
 
Fields inherited from interface wt.method.MethodFeedback
versionID
 
Constructor Summary
StatusFeedback()
          Public no-arg constructor required by Externalizable.
StatusFeedback(String status)
          Construct a new StatusFeedback object to carry the given status string.
StatusFeedback(String resource_bundle, String key)
          Construct a new StatusFeedback object to carry a localizable status message.
StatusFeedback(String resource_bundle, String key, Object[] params)
          Construct a new StatusFeedback object to carry a localizable status message that includes argument substitution.
 
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

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

status

private String status

resourceBundle

private String resourceBundle

messageKey

private String messageKey

textInserts

private Object[] textInserts
Constructor Detail

StatusFeedback

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

Supported API: true


StatusFeedback

public StatusFeedback(String status)
Construct a new StatusFeedback object to carry the given status string.

Supported API: true

Parameters:
status - the status message

StatusFeedback

public StatusFeedback(String resource_bundle,
                      String key)
Construct a new StatusFeedback object to carry a localizable status message.

Supported API: true

Parameters:
resource_bundle - the name of the base resource bundle subclass containing the localizable message
key - the key associated with the localizable message
See Also:
ResourceBundle, MessageFormat

StatusFeedback

public StatusFeedback(String resource_bundle,
                      String key,
                      Object[] params)
Construct a new StatusFeedback object to carry a localizable status message that includes argument substitution.

Supported API: true

Parameters:
resource_bundle - the name of the base resource bundle subclass containing the localizable message
key - the key associated with the localizable message
params - an optional set of objects to be formatted into the localizable message text
See Also:
ResourceBundle, MessageFormat
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. If the calling thread is an instance of WTThread, the thread's status property is set to this objects status value. If the calling thread is not an instance of WTThread, the status is sent to the current thread's WTContext object's showStatus messages, which typically displays it in a browser window's status area.

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