biz.hammurapi.remoting
Class Invocation

java.lang.Object
  extended by biz.hammurapi.remoting.Invocation
All Implemented Interfaces:
biz.hammurapi.xml.dom.DomSerializable, XmlObjectSerializable, java.io.Serializable

public class Invocation
extends java.lang.Object
implements biz.hammurapi.xml.dom.DomSerializable, java.io.Serializable, XmlObjectSerializable

Method invocation.

Author:
Pavel
See Also:
Serialized Form

Nested Class Summary
static interface Invocation.Stateful
          Interface to inject client state into the server object before invocation and reset it after.
 
Constructor Summary
Invocation(java.lang.Object state, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.String id)
           
Invocation(java.lang.Object state, java.lang.String declaringClass, java.lang.String methodName, java.lang.String[] parameterTypes, java.lang.Object[] args, java.lang.String id)
           
 
Method Summary
 java.lang.reflect.Method findMethod(java.lang.ClassLoader classLoader)
          Finds method to invoke.
static java.lang.reflect.Method findMethod(biz.hammurapi.invocation.Invocation invocation, java.lang.ClassLoader classLoader)
          Finds method to invoke.
 java.lang.Object[] getArguments()
           
 java.lang.String getDeclaringClass()
           
 java.lang.String getId()
           
 java.lang.String getMethodName()
           
 java.lang.String[] getParameterTypes()
           
 java.lang.Object getState()
           
 java.lang.Object invoke(java.lang.Object instance)
          Method for simple invocation.
 void toDom(org.w3c.dom.Element holder)
           
 org.apache.xmlbeans.XmlObject toXmlObject()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Invocation

public Invocation(java.lang.Object state,
                  java.lang.String declaringClass,
                  java.lang.String methodName,
                  java.lang.String[] parameterTypes,
                  java.lang.Object[] args,
                  java.lang.String id)

Invocation

public Invocation(java.lang.Object state,
                  java.lang.reflect.Method method,
                  java.lang.Object[] args,
                  java.lang.String id)
Method Detail

getState

public java.lang.Object getState()

getId

public java.lang.String getId()

getMethodName

public java.lang.String getMethodName()

getDeclaringClass

public java.lang.String getDeclaringClass()

getParameterTypes

public java.lang.String[] getParameterTypes()

getArguments

public java.lang.Object[] getArguments()

toDom

public void toDom(org.w3c.dom.Element holder)
Specified by:
toDom in interface biz.hammurapi.xml.dom.DomSerializable

toXmlObject

public org.apache.xmlbeans.XmlObject toXmlObject()
Specified by:
toXmlObject in interface XmlObjectSerializable

findMethod

public static java.lang.reflect.Method findMethod(biz.hammurapi.invocation.Invocation invocation,
                                                  java.lang.ClassLoader classLoader)
                                           throws java.lang.ClassNotFoundException,
                                                  java.lang.NoSuchMethodException
Finds method to invoke.

Parameters:
invocation -
classLoader - Classloader, can be null.
Returns:
Throws:
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException

findMethod

public java.lang.reflect.Method findMethod(java.lang.ClassLoader classLoader)
                                    throws java.lang.ClassNotFoundException,
                                           java.lang.NoSuchMethodException
Finds method to invoke.

Parameters:
invocation -
classLoader - Classloader, can be null.
Returns:
Throws:
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException

invoke

public java.lang.Object invoke(java.lang.Object instance)
                        throws java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException,
                               java.lang.ClassNotFoundException,
                               java.lang.NoSuchMethodException
Method for simple invocation.

Parameters:
instance -
Returns:
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException


Copyright © 2006 Hammurapi Group. All Rights Reserved.