| java.lang.Object org.ow2.easybeans.proxy.client.AbsInvocationHandler
All known Subclasses: org.ow2.easybeans.proxy.client.ClientRPCInvocationHandler, org.ow2.easybeans.proxy.client.LocalCallInvocationHandler,
AbsInvocationHandler | abstract public class AbsInvocationHandler implements InvocationHandler,Serializable(Code) | | Abstract class used by remote or local invocation handler.
author: Florent Benoit |
AbsInvocationHandler | public AbsInvocationHandler(String containerId, String factoryName, boolean useID)(Code) | | Build a new Invocation handler.
Parameters: containerId - the id of the container that will be called on theremote side. Parameters: factoryName - the name of the remote factory. Parameters: useID - true if all instance build with this ref are unique(stateful), false if it references the same object (stateless) |
getBeanId | public Long getBeanId()(Code) | | Gets the bean id.
the bean id. |
getContainerId | protected String getContainerId()(Code) | | the container id. |
getFactoryName | public String getFactoryName()(Code) | | the name of the factory. |
getHashedMethods | protected Map<Method, Long> getHashedMethods()(Code) | | the hashes for each method. |
getInterfaceClassName | public String getInterfaceClassName()(Code) | | the name of the interface that represents this handler. |
handleObjectMethods | protected Object handleObjectMethods(Method method, Object[] args)(Code) | | Manages all methods of java.lang.Object class.
Parameters: method - the Method instance corresponding to theinterface method invoked on the proxy instance. The declaringclass of the Method object will be the interfacethat the method was declared in, which may be a superinterface ofthe proxy interface that the proxy class inherits the methodthrough. Parameters: args - an array of objects containing the values of the argumentspassed in the method invocation on the proxy instance the value of the called method. |
handleThrowable | protected void handleThrowable(Throwable originalThrowable, boolean isApplicationException, Method method, RPCException rpcException) throws Exception(Code) | | Handle the given throwable and throw the correct exception to the client.
Parameters: originalThrowable - the exception that has been thrown on the server side. Parameters: isApplicationException - true if it is an application exception, else false. Parameters: method - the Method instance corresponding to theinterface method invoked on the proxy instance. Parameters: rpcException - the RPC exception if any throws: Exception - the exception that has been wrapped or not for the client. |
isExtendingRmiRemote | public boolean isExtendingRmiRemote()(Code) | | true if the interface used by this handler is extending java.rmi.Remote. |
isRemoved | public boolean isRemoved()(Code) | | true if the bean has been removed |
isUsingID | public boolean isUsingID()(Code) | | true : (stateful), false if it references the same object (stateless). |
setBeanId | protected void setBeanId(Long beanId)(Code) | | Sets the id of the bean.
Parameters: beanId - the new ID. |
setContainerId | protected void setContainerId(String containerId)(Code) | | Sets the container ID.
Parameters: containerId - the identifier of the container. |
setExtendingRmiRemote | public void setExtendingRmiRemote(boolean isItfExtendingRmiRemote)(Code) | | Sets the flag if interface is extending java.rmi.Remote.
Parameters: isItfExtendingRmiRemote - true if it extending, else false. |
setFactoryName | protected void setFactoryName(String factoryName)(Code) | | Sets the factory's name.
Parameters: factoryName - the name of the factory. |
setHashedMethods | protected void setHashedMethods(Map<Method, Long> hashedMethods)(Code) | | Sets the hashed methods.
Parameters: hashedMethods - the hash for each method. |
setInterfaceClass | public void setInterfaceClass(Class> clz)(Code) | | Sets the interface that represents this handler.
Parameters: clz - the instance of the interface. |
setInterfaceClassName | protected void setInterfaceClassName(String interfaceClassName)(Code) | | Sets the name of the interface that represents this handler.
Parameters: interfaceClassName - the name of the interface. |
setRemoved | public void setRemoved(boolean removed)(Code) | | Sets the removed flag.
Parameters: removed - if bean has been removed. |
setUseID | public void setUseID(boolean useID)(Code) | | Sets the flag if all instance build with this ref are unique or not.
Parameters: useID - true : (stateful), false if it references the same object (stateless). |
toString | public String toString()(Code) | | Gets a string representation for this handler.
a string representation for this handler. |
|
|