public class FilterInvocationProcessor extends java.lang.Object implements XmlRpcInvocationProcessor
Constructor and Description |
---|
FilterInvocationProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
addFilters(java.lang.String handler,
java.util.List filterList)
Adds a filter to the processor, comprising of an optional handler name and a list
of IP masks.
|
void |
addFiltersByName(java.lang.String handler,
java.util.List filterList)
Adds a filter to the processor, comprising of an optional handler name and a list
of IP masks.
|
void |
onException(int callId,
java.lang.String callerIp,
java.lang.String handler,
java.lang.String method,
java.util.List arguments,
java.lang.Throwable exception)
Does nothing.
|
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)
Does nothing.
|
boolean |
preProcess(int callId,
java.lang.String callerIp,
java.lang.String handler,
java.lang.String method,
java.util.List arguments)
Examines the caller IP and the method to see if the invocation should be performed.
|
public final void addFilters(java.lang.String handler, java.util.List filterList)
Note! This method takes the ownership of the supplied filter List. That is, the supplied List should not be used after calling this method.
handler
- The handler to which the filter should apply, or null, if the filters should
apply to all handlers.filterList
- A list of strings containing IP addresses with or without wildcards.
For instance, 192.168.*.* is a valid filter entry.public void addFiltersByName(java.lang.String handler, java.util.List filterList) throws java.lang.IllegalArgumentException, java.net.UnknownHostException
Note! This method takes the ownership of the supplied filter List. That is, the supplied List should not be used after calling this method.
filterList
- A list of strings containing IP addresses with or without wildcards.
For instance, 192.168.*.* is a valid filter entry.java.lang.IllegalArgumentException
java.net.UnknownHostException
public boolean preProcess(int callId, java.lang.String callerIp, java.lang.String handler, java.lang.String method, java.util.List arguments)
preProcess
in interface XmlRpcInvocationProcessor
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)
postProcess
in interface XmlRpcInvocationProcessor
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)
onException
in interface XmlRpcInvocationProcessor
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.