|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XmlRpcInvocationInterceptor
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 serve 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 method 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 | |
---|---|
java.lang.Object |
after(XmlRpcInvocation incovation,
java.lang.Object returnValue)
Called by an XmlRpcServer after the supplied method has been called. |
boolean |
before(XmlRpcInvocation invocation)
Called by an XmlRpcServer before the method with the supplied name is called. |
void |
onException(XmlRpcInvocation incovation,
java.lang.Throwable exception)
Called by an XmlRpcServer when the supplied method throws an exception. |
Method Detail |
---|
boolean before(XmlRpcInvocation invocation)
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.
invocation
- The invocation intercepted by the processor.
java.lang.Object after(XmlRpcInvocation incovation, java.lang.Object returnValue)
If the interceptor returns null it means that the call was intercepted completely and that the interceptor itself is responsible of generating a response to the caller through the java.io.Writer in the XmlRpcInvocation. This makes it possible to write interceptors that override the whole serialization mechanism to return customized content for invocations.
invocation
- The invocation intercepted by the processor.returnValue
- The object returned by the method. If the method
returned a primitive, it is wrapped in its object counterpart.
void onException(XmlRpcInvocation incovation, java.lang.Throwable exception)
invocation
- The invocation intercepted by the processor.exception
- The exception thrown by the method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |