public class RequestThread extends Object implements Runnable
runRequest
in the class
DefaultRemoteApplication
or the class that extends it).
The class also handles the XML document reply or error text that should be returned to the RAPP client.
Constructor and Description |
---|
RequestThread(DefaultRemoteApplication dra,
ClientConnectionData ccd,
Document document,
int requestID)
Creates a new instance of the request thread and
starts it.
|
Modifier and Type | Method and Description |
---|---|
Document |
getDocument()
Gets the document for this request or null for none.
|
String |
getError()
Gets the error string, or null if no error exists or
the request has not completed.
|
String |
getReply()
Gets the reply to the request as an XML string, or
null if there is an error or the request has not completed.
|
int |
getRequestID()
Gets the request ID.
|
boolean |
hasCompleted()
Checks if the request has completed.
|
void |
run()
Called when the thread is started.
|
void |
setError(String errorText)
Call this method to set the XML string of the reply.
|
void |
setReply(String xmlString)
Call this method to set the XML string of the reply.
|
public RequestThread(DefaultRemoteApplication dra, ClientConnectionData ccd, Document document, int requestID)
public int getRequestID()
public Document getDocument()
setReply
or
setError
has been done, or if the request
thread has completed execution.public void run()
runRequest
in the class DefaultRemoteApplication
or the class that extends it).
When the thread has finished executing, a check will
be done to see that a reply or an error has been set
using the method setReply
or
setError
respectively. If this is the case,
an error will be stored for the request indicating this fact.
run
in interface Runnable
setReply(java.lang.String)
,
setError(java.lang.String)
,
hasCompleted()
,
getError()
,
getReply()
public void setReply(String xmlString)
Only a single call to this method is allowed, and
no prior call to setError
must have been done.
setError(java.lang.String)
,
getReply()
,
hasCompleted()
public void setError(String errorText)
Only a single call to this method is allowed, and
no prior call to setError
must have been done.
setReply(java.lang.String)
,
getError()
,
hasCompleted()
public boolean hasCompleted()
getError()
,
getReply()
public String getError()
public String getReply()
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.