Package wt.feedback

Class StatusFeedback

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

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:
  • Constructor Details

    • 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:
    • 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:
  • Method Details

    • 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