public class InterceptorItem extends Object implements Invoke
| Modifier and Type | Field and Description |
|---|---|
static Object |
CONTINUE
This object is used a signal from an interceptor object.
|
Object |
interceptor
The interceptor object.
|
Object |
item
This is the object to be intercepted.
|
| Constructor and Description |
|---|
InterceptorItem(Object item,
Object interceptor)
This creates the object, to intercept the target object's calls.
|
public final Object interceptor
public final Object item
public static final Object CONTINUE
public InterceptorItem(Object item, Object interceptor)
item - The object to receive the client invocation. It can be
local, remote, or even a proxy.interceptor - The object to receive the calls prior to the
intercepted item's operation. It can be local, remote, or even a proxy.public Object invoke(String method, Object args) throws Exception
InterceptorItem.CONTINUE
object, indicating that the intercepted object should process the
invocation.
Note: if the interceptor object does not have a method comparably matching what is being invoked, it will be automatically passed on to the intercepted object. This allows the interceptor to define only the methods it wishes to potentially override/except.
invoke in interface Invokemethod - The intercepted object's public method being called.args - The arguments being passed to the intercepted object's
method.NoSuchMethodException - If the method/agruments signature cannot
be matched to the internal object's public method interface.RemoteException - For any network realated failures.Exception - If the interceptor object's method rejects the
invocation, or if it has been rejected by the intercepted object.Copyright © 2016. All Rights Reserved.