fr.umlv.corosol.component.impl
Class DefaultJMethodInvoker

java.lang.Object
  extended by fr.umlv.corosol.component.impl.AbstractJVMComponent
      extended by fr.umlv.corosol.component.impl.DefaultJMethodInvoker
All Implemented Interfaces:
JMethodInvoker, JObject, JVMComponent
Direct Known Subclasses:
RealJMethodInvoker, VerboseJMethodInvoker

public class DefaultJMethodInvoker
extends AbstractJVMComponent
implements JMethodInvoker

The default implementation of the JMethodInvoker interface.

Author:
Christophe Deleray

Constructor Summary
DefaultJMethodInvoker()
          The default constructor.
 
Method Summary
 void configure(JVirtualMachine jvm)
          Configures the component via the specified JVM.
 java.lang.Class getComponentClass()
          Returns the class object describing this component.
 void invokeConstructor(JConstructor constructor, JThread thread)
          Invokes the specified constructor into the specified thread.
 void invokeMethod(JMethod method, JThread thread)
          Invokes the specified method into the specified thread.
 java.lang.String toString()
          Returns a string representation of this JMethodInvoker object.
 
Methods inherited from class fr.umlv.corosol.component.impl.AbstractJVMComponent
replace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface fr.umlv.corosol.component.JVMComponent
replace
 

Constructor Detail

DefaultJMethodInvoker

public DefaultJMethodInvoker()
The default constructor.

Method Detail

configure

public void configure(JVirtualMachine jvm)
Configures the component via the specified JVM. During this configuration operation, this component can meet any existing component of the specified JVM.

Specified by:
configure in interface JVMComponent
Overrides:
configure in class AbstractJVMComponent
Parameters:
jvm - the Java Virtual Machine

getComponentClass

public java.lang.Class getComponentClass()
Returns the class object describing this component.

Specified by:
getComponentClass in interface JVMComponent

invokeMethod

public void invokeMethod(JMethod method,
                         JThread thread)
                  throws java.lang.Exception
Invokes the specified method into the specified thread.

Specified by:
invokeMethod in interface JMethodInvoker
Parameters:
method - the method to be invoked
thread - a thread
Throws:
java.lang.Exception - if the executed method throws an exception

invokeConstructor

public void invokeConstructor(JConstructor constructor,
                              JThread thread)
                       throws java.lang.Exception
Invokes the specified constructor into the specified thread.

Specified by:
invokeConstructor in interface JMethodInvoker
Parameters:
constructor - the constructor to be invoked
thread - a thread
Throws:
java.lang.Exception - if the executed method throws an exception

toString

public java.lang.String toString()
Returns a string representation of this JMethodInvoker object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this JMethodInvoker object