|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Invocation processors are called by XmlRpcServers before and after a call is dispathed to its invocation handler. Processors are called for all inbound messages regardless of destination. They server as appropriate entry points where logging and other type of processing may be inserted. For instance, a transaction processor may examine the name of the emthod being called, and if it starts with "tx_" it may add an additional transaction argument to the list of arguments received by the method. After the call is dispatched, the transaction may be commited or rolled back, in case of an error.
Method Summary | |
void |
onException(int callId,
java.lang.String callerIp,
java.lang.String handler,
java.lang.String method,
java.util.List arguments,
java.lang.Throwable exception)
Called by an XmlRpcServer when the supplied method throws an exception. |
java.lang.Object |
postProcess(int callId,
java.lang.String callerIp,
java.lang.String handler,
java.lang.String method,
java.util.List arguments,
java.lang.Object returnValue)
Called by an XmlRpcServer after the supplied method has been called. |
boolean |
preProcess(int callId,
java.lang.String callerIp,
java.lang.String handler,
java.lang.String method,
java.util.List arguments)
Called by an XmlRpcServer before the method with the supplied name is called. |
Method Detail |
public boolean preProcess(int callId, java.lang.String callerIp, java.lang.String handler, java.lang.String method, java.util.List arguments)
If, for some reason, the processor wishes to cancel the invocation altogether, it returns false from this method. This may be the case for filtering processors where certain IP-addresses are restricted from particular methods, or if the arguments contain some encrypted password and username that does not authorize.
callId
- A sequence number for tracing calls between preProcess() and
postProcess() calls. This is unique within each session. That is,
the sequence is restarted when the application restarts.handler
- The name of the handler being called.method
- The name of the method being called.arguments
- The arguments that will be sent to the method.
public java.lang.Object postProcess(int callId, java.lang.String callerIp, java.lang.String handler, java.lang.String method, java.util.List arguments, java.lang.Object returnValue)
callId
- A sequence number for tracing calls between preProcess() and
postProcess() calls. This is unique within each session. That is,
the sequence is restarted when the application restarts.handler
- The name of the handler being called.method
- The name of the method that just has returned.returnValue
- The objects returned by the method. If the method
returned a primitive, it is wrapped in its object counterpart.
public void onException(int callId, java.lang.String callerIp, java.lang.String handler, java.lang.String method, java.util.List arguments, java.lang.Throwable exception)
callId
- A sequence number for tracing calls between preProcess() and
postProcess() calls. This is unique within each session. That is,
the sequence is restarted when the application restarts.handler
- The name of the handler being called.method
- The name of the method that just has returned by throwing an
exception.exception
- The exception thrown by the method.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |