Package wt.feedback
Class StatusFeedback
java.lang.Object
wt.feedback.StatusFeedback
- All Implemented Interfaces:
Externalizable,Serializable,MethodFeedback
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 Summary
ConstructorsConstructorDescriptionPublic no-arg constructor required by Externalizable.StatusFeedback(String status) Construct a newStatusFeedbackobject to carry the given status string.StatusFeedback(String resource_bundle, String key) Construct a newStatusFeedbackobject to carry a localizable status message.StatusFeedback(String resource_bundle, String key, Object[] params) Construct a newStatusFeedbackobject to carry a localizable status message that includes argument substitution. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Perform feedback operation in client.voidreadExternal(ObjectInput input_stream) Called during marshaling on the client side.voidwriteExternal(ObjectOutput output_stream) Called during marshaling on the server side.
-
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
Construct a newStatusFeedbackobject to carry the given status string.
Supported API: true- Parameters:
status- the status message
-
StatusFeedback
Construct a newStatusFeedbackobject to carry a localizable status message.
Supported API: true- Parameters:
resource_bundle- the name of the base resource bundle subclass containing the localizable messagekey- the key associated with the localizable message- See Also:
-
StatusFeedback
Construct a newStatusFeedbackobject 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 messagekey- the key associated with the localizable messageparams- 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 ofWTThread, the thread's status property is set to this objects status value. If the calling thread is not an instance ofWTThread, the status is sent to the current thread'sWTContextobject'sshowStatusmessages, which typically displays it in a browser window's status area.
Supported API: true- Specified by:
executein interfaceMethodFeedback
-
readExternal
Called during marshaling on the client side.
Supported API: true- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
Called during marshaling on the server side.
Supported API: true- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-