|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRpcResult
Represents the result from invoking a specific RPC in a remote context. The result encapsulates either the RPC return value or any exception string raised when the RPC was handled in the remote context.
The isSuccessful()
method should be examined before calling either
getResult()
or getExceptionMessage()
. Both
getResult()
and getExceptionMessage()
are mutually
exclusive and when not applicable, these methods may return null
. This is why is it important to call isSuccessful()
to determine
which of these methods to interrogate for the result status.
Results are transmitted back to the remote callers in result records. A
result record is an IContainer
. These are subsequently converted into
IRpcResult
objects.
RpcManager
Field Summary | |
---|---|
static String |
EXCEPTION
The name of the field in the result record for the getExceptionMessage() attribute |
static String |
IS_SUCCESSFUL
The name of the field in the result record for the isSuccessful() attribute |
static String |
MARKER
The name of the field in the result record for the RPC marker. |
static String |
RESULT
The name of the field in the result record for the getResult()
attribute |
Method Summary | |
---|---|
String |
getExceptionMessage()
Get the exception message if the RPC was not executed successfully. |
IRpcMarker |
getMarker()
Get the marker for the RPC invocation this result is for. |
IField |
getResult()
Get the result from the RPC |
boolean |
isSuccessful()
Determine whether the RPC was successfully executed. |
void |
updateResultRecord(IRpcMarker marker,
IContainer resultRecord)
Update the RPC's result record with the data from this result instance. |
Field Detail |
---|
static final String MARKER
IRpcResultHandler
,
Constant Field Valuesstatic final String IS_SUCCESSFUL
isSuccessful()
attribute
static final String RESULT
getResult()
attribute
static final String EXCEPTION
getExceptionMessage()
attribute
Method Detail |
---|
boolean isSuccessful()
getResult()
will return the result from the
RPC. If it was not successful, calling getExceptionMessage()
will return a reason why the RPC was not successful.
true
if the RPC was successfully executed.IField getResult()
null
if the RPC was not
successfulisSuccessful()
String getExceptionMessage()
null
if the RPC was successfulisSuccessful()
IRpcMarker getMarker()
IRpcManager.invoke(IRpcResultHandler, String, String, IField...)
void updateResultRecord(IRpcMarker marker, IContainer resultRecord)
marker
- the marker for the RPC call this result is forresultRecord
- the result record for the RPC this result is for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |