| java.lang.Object org.jicarilla.lang.Invocation
Invocation | final public class Invocation implements Recyclable(Code) | | A simple bean modelling a method invocation. It can be used as part of a
simple method interception model, or to redirect method calls elsewhere. See
the
AsyncEnabled AsyncEnabled interface, which accepts an invocation
object to support asynchronous method invocation.
Implementation notes Since this class is performance
critical, everything is marked final, and we don't use an interface.
Performs no state validation of any kind.
author: Leo Simons version: $Id: Invocation.java,v 1.1 2004/03/23 13:37:56 lsimons Exp $ |
Method Summary | |
protected boolean | equalField(Object thisF, Object otherF) Test whether two fields are the same. | public boolean | equals(Object object) Compares objects for equality. | final public Object[] | getArgs() Get the arguments to the method. | final public Map | getInvocationContext() Get the map of arbitrary values associated with this invocation, the
invocation context. | final public Method | getMethod() Get the method to invoke on the recipient. | final public Object | getProxy() Get the proxy around the target. | final public Object | getResult() Get the result of the invocation. | final public Object | getTarget() Get the recipient of the invocation. | final public Throwable | getThrowable() Get the exception or error caused by the invocation. | public int | hashCode() Return a code for placing the invocation in a hash. | final public void | recycle() Recycle the invocation. | final public void | setArgs(Object[] args) Set the arguments to the method. | final public void | setInvocationContext(Map invocationContext) Set the map of arbitrary values associated with this invocation, the
invocation context. | final public void | setMethod(Method method) Set the method to invoke on the recipient. | final public void | setProxy(Object proxy) Set the proxy around the target. | final public void | setResult(Object result) Set the result of the invocation. | final public void | setTarget(Object target) Set the recipient of the invocation. | final public void | setThrowable(Throwable throwable) Set the exception or error caused by the invocation. |
m_invocationContext | protected Map m_invocationContext(Code) | | |
Invocation | public Invocation()(Code) | | Create an empty invocation instance.
|
Invocation | public Invocation(Object target, Object proxy, Method method, Object[] args)(Code) | | Create a fully populated invocation instance.
Parameters: target - the actual recipient of the invocation Parameters: proxy - the proxy around the target Parameters: method - the method to call on the target Parameters: args - the arguments to the method |
equalField | protected boolean equalField(Object thisF, Object otherF)(Code) | | Test whether two fields are the same. A helper method for equals().
Parameters: thisF - the first field to test Parameters: otherF - the second field to test true if the arguments are equal, false otherwise |
equals | public boolean equals(Object object)(Code) | | Compares objects for equality.
Parameters: object - the object to test against this one true if the two objects are equal, false otherwise See Also: java.lang.Object.equals(Object) |
getArgs | final public Object[] getArgs()(Code) | | Get the arguments to the method.
the arguments |
getInvocationContext | final public Map getInvocationContext()(Code) | | Get the map of arbitrary values associated with this invocation, the
invocation context.
the map containing the invocation context |
getMethod | final public Method getMethod()(Code) | | Get the method to invoke on the recipient.
the method to invoke |
getProxy | final public Object getProxy()(Code) | | Get the proxy around the target.
the proxy |
getResult | final public Object getResult()(Code) | | Get the result of the invocation.
the result |
getTarget | final public Object getTarget()(Code) | | Get the recipient of the invocation.
the recipient |
getThrowable | final public Throwable getThrowable()(Code) | | Get the exception or error caused by the invocation.
the exception or error |
hashCode | public int hashCode()(Code) | | Return a code for placing the invocation in a hash.
a code hash for use in hash mapping See Also: Object.hashCode |
setArgs | final public void setArgs(Object[] args)(Code) | | Set the arguments to the method.
Parameters: args - the arguments |
setInvocationContext | final public void setInvocationContext(Map invocationContext)(Code) | | Set the map of arbitrary values associated with this invocation, the
invocation context.
Parameters: invocationContext - the map containing the invocation context |
setMethod | final public void setMethod(Method method)(Code) | | Set the method to invoke on the recipient.
Parameters: method - the method to invoke |
setProxy | final public void setProxy(Object proxy)(Code) | | Set the proxy around the target.
Parameters: proxy - the proxy |
setResult | final public void setResult(Object result)(Code) | | Set the result of the invocation.
Parameters: result - the result |
setTarget | final public void setTarget(Object target)(Code) | | Set the recipient of the invocation.
Parameters: target - the recipient |
setThrowable | final public void setThrowable(Throwable throwable)(Code) | | Set the exception or error caused by the invocation.
Parameters: throwable - the exception or error |
|
|