|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
com.retrogui.dualrpc.common.RpcWorker
This is Lipe's enhanced worker that executes a remote procedure call. Results are returned via a result object. The worker uses reflection to locate and execute the approprate method. Lipe's enhancement adds flexibility because it permits a handler method to be called if the incoming parameter values are assignable subtypes of the method parameters.
| Field Summary |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Fields inherited from interface com.retrogui.dualrpc.common.IDualRpcMessageConstants |
DEFAULT_RPC_CALL_TIMEOUT, PAYLOAD_TYPE_RPC_CALL, PAYLOAD_TYPE_RPC_FAULT, PAYLOAD_TYPE_RPC_RESULT, RPC_FAULTCODE_EXCEPTION |
| Constructor Summary | |
RpcWorker(IRpcMessageDispatcher dispatcher,
Message message)
Creates a new RpcWorker object. |
|
| Method Summary | |
java.lang.String |
buildFaultErrorMessage(long sessionId,
java.lang.Throwable t)
Construct the fault error message that is returned to the caller |
java.lang.reflect.Method |
findMethod(java.lang.Class klass,
java.lang.String methodName,
java.lang.Class[] parameterClasses)
Find a matching method. |
IRpcMessageDispatcher |
getDispatcher()
getter |
Message |
getMessage()
getter |
void |
processRpcCallMessage(Message message)
Do the rpc call. |
void |
processRpcResultMessage(Message message,
java.lang.String payloadType)
Process a result message. |
void |
run()
Locate and execute the handler method, then exit. |
void |
sendFaultMessage(java.lang.String originatingRpcCallMessageId,
java.lang.String errorMessage)
Create and send a fault message |
void |
setDispatcher(IRpcMessageDispatcher dispatcher)
setter |
void |
setMessage(Message message)
setter |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RpcWorker(IRpcMessageDispatcher dispatcher,
Message message)
dispatcher - message - | Method Detail |
public void run()
run in interface java.lang.Runnable
public void processRpcCallMessage(Message message)
throws SessionException
message -
SessionException
public java.lang.String buildFaultErrorMessage(long sessionId,
java.lang.Throwable t)
sessionId - t -
public void processRpcResultMessage(Message message,
java.lang.String payloadType)
throws RpcException
message - payloadType -
RpcExceptionpublic IRpcMessageDispatcher getDispatcher()
public void setDispatcher(IRpcMessageDispatcher dispatcher)
dispatcher - public Message getMessage()
public void setMessage(Message message)
message -
public void sendFaultMessage(java.lang.String originatingRpcCallMessageId,
java.lang.String errorMessage)
throws SessionException
originatingRpcCallMessageId - errorMessage -
SessionException
public java.lang.reflect.Method findMethod(java.lang.Class klass,
java.lang.String methodName,
java.lang.Class[] parameterClasses)
klass - methodName - parameterClasses -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||