WebLogic Process Integrator Version 1.1

com.bea.wlpi.common
Class ClassInvocationDescriptor

java.lang.Object
  |
  +--com.bea.wlpi.common.ClassInvocationDescriptor

public class ClassInvocationDescriptor
extends java.lang.Object
implements java.io.Serializable

Describes and implements the invocation of a method in an arbitrary Java class. It is used to pass information on server-side classes to the client (where the class in question may not be accessible), and to instantiate such an object in the server and invoke a method thereon.

See Also:
ClassDescriptor, EJBDescriptor, EJBInvocationDescriptor, Serialized Form

Constructor Summary
ClassInvocationDescriptor(java.lang.String description, java.lang.String className, MethodDescriptor constructorDescriptor, java.lang.String[] constructorParmDescriptions, MethodDescriptor methodDescriptor, java.lang.String[] methodParmDescriptions)
          Create a new class invocation descriptor object.
 
Method Summary
 java.lang.String getClassName()
          Return the fully qualified Java class name.
 MethodDescriptor getConstructor()
          Return meta-data for constructor to invoke.
 java.lang.String[] getConstructorParmsDescriptions()
          Return constructor parameter descriptions.
 java.lang.String getDescription()
          Return a human-readable description of the method invocation.
 java.lang.String getId()
          Return the system-assigned unique identifier.
 MethodDescriptor getMethod()
          Return meta-data for method to invoke.
 java.lang.String[] getMethodParmsDescriptions()
          Return method parameter descriptions.
 java.lang.Object invoke(java.lang.Object[] constructorParameters, java.lang.Object[] methodParameters)
          Create an instance of the Java class; then, invoke a method on it.
 java.lang.Object invokeConstructor(java.lang.Object[] constructorParameters)
          Create an instance of the Java class.
 java.lang.Object invokeMethod(java.lang.Object obj, java.lang.Object[] methodParameters)
          Invoke the method specified by this descriptor on an object.
 void set(java.lang.String description, java.lang.String className, MethodDescriptor constructorDescriptor, java.lang.String[] constructorParmDescriptions, MethodDescriptor methodDescriptor, java.lang.String[] methodParmDescriptions)
          Update a class invocation descriptor.
 void setId(java.lang.String id)
          Set the unique identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassInvocationDescriptor

public ClassInvocationDescriptor(java.lang.String description,
                                 java.lang.String className,
                                 MethodDescriptor constructorDescriptor,
                                 java.lang.String[] constructorParmDescriptions,
                                 MethodDescriptor methodDescriptor,
                                 java.lang.String[] methodParmDescriptions)
Create a new class invocation descriptor object.
Parameters:
description - Human-readable description of the method invocation.
className - Fully qualified Java class name.
constructorDescriptor - Meta-data for constructor to invoke.
constructorParmDescriptions - Constructor parameter descriptions.
methodDescriptor - Meta-data for method to invoke.
methodParmDescriptions - Method parameter descriptions.
Method Detail

set

public void set(java.lang.String description,
                java.lang.String className,
                MethodDescriptor constructorDescriptor,
                java.lang.String[] constructorParmDescriptions,
                MethodDescriptor methodDescriptor,
                java.lang.String[] methodParmDescriptions)
Update a class invocation descriptor.
Parameters:
description - Human-readable description of the method invocation.
className - Fully qualified Java class name.
constructorDescriptor - Meta-data for constructor to invoke.
constructorParmDescriptions - Constructor parameter descriptions.
methodDescriptor - Meta-data for method to invoke.
methodParmDescriptions - Method parameter descriptions.

getId

public final java.lang.String getId()
Return the system-assigned unique identifier.
Returns:
The system-assigned unique identifier.
See Also:
setId(java.lang.String)

setId

public void setId(java.lang.String id)
Set the unique identifier.
Parameters:
id - The unique identifier.
See Also:
getId()

getClassName

public final java.lang.String getClassName()
Return the fully qualified Java class name.
Returns:
The fully qualified Java class name.

getDescription

public final java.lang.String getDescription()
Return a human-readable description of the method invocation.
Returns:
Human-readable description of the method invocation.

getMethod

public final MethodDescriptor getMethod()
Return meta-data for method to invoke.
Returns:
Meta-data for method to invoke.

getConstructor

public final MethodDescriptor getConstructor()
Return meta-data for constructor to invoke.
Returns:
Meta-data for constructor to invoke.

getConstructorParmsDescriptions

public final java.lang.String[] getConstructorParmsDescriptions()
Return constructor parameter descriptions.
Returns:
Constructor parameter descriptions.

getMethodParmsDescriptions

public final java.lang.String[] getMethodParmsDescriptions()
Return method parameter descriptions.
Returns:
Method parameter descriptions.

invoke

public java.lang.Object invoke(java.lang.Object[] constructorParameters,
                               java.lang.Object[] methodParameters)
                        throws WorkflowException
Create an instance of the Java class; then, invoke a method on it. Parameter and return types match those declared for the constructor and method, respectively, and primitive Java types are wrapped in a corresponding java.lang.* object (e.g., int is passed using a java.lang.Integer object, long using a java.lang.Long, etc.).
Parameters:
constructorParameters - Actual constructor parameter values.
methodParameters - Actual method parameter values.
Returns:
The value returned by the invoked method.
Throws:
WorkflowException - if the specified class cannot be loaded, or if the actual constructor or method parameters do not match those specified in this descriptor in number and type, or if any parameter class cannot be loaded, or if the specified constructor or method cannot be found, or if the constructor call fails, or if any of the parameters are not instances of the corresponding classes (or subclasses thereof) specified by this descriptor, or if the invoked method throws an exception.
See Also:
invokeConstructor(java.lang.Object[]), invokeMethod(java.lang.Object, java.lang.Object[])

invokeConstructor

public java.lang.Object invokeConstructor(java.lang.Object[] constructorParameters)
                                   throws WorkflowException
Create an instance of the Java class. Parameter types match those declared for the constructor, and primitive Java types are wrapped in a corresponding java.lang.* object (e.g., int is passed using a java.lang.Integer object, long using a java.lang.Long, etc.).
Parameters:
constructorParameters - Actual constructor parameter values.
Returns:
An instance of the class specified by this descriptor.
Throws:
WorkflowException - if the specified class cannot be loaded, or if the actual constructor parameters do not match those specified in this descriptor in number and type, or if any parameter classes cannot be loaded, or if the specified constructor cannot be found, or if the constructor call fails.
See Also:
invoke(java.lang.Object[], java.lang.Object[]), invokeMethod(java.lang.Object, java.lang.Object[])

invokeMethod

public java.lang.Object invokeMethod(java.lang.Object obj,
                                     java.lang.Object[] methodParameters)
                              throws WorkflowException
Invoke the method specified by this descriptor on an object. Parameter and return types match those declared for the method, and primitive Java types are wrapped in a corresponding java.lang.* object (e.g., int is passed using a java.lang.Integer object, long using a java.lang.Long, etc.).
Parameters:
obj - An instance of the class specified by this descriptor object, on which the specified method is to be invoked.
methodParameters - Actual method parameter values.
Returns:
The value returned by the invoked method.
Throws:
WorkflowException - if the specified class cannot be loaded, or if the actual method parameters do not match those specified in this descriptor in number and type, or if any parameter classes cannot be loaded, or if the specified method cannot be found, or if the supplied object or any of the parameters are not instances of the corresponding classes (or subclasses thereof) specified by this descriptor, or if the invoked method throws an exception.
See Also:
invoke(java.lang.Object[], java.lang.Object[]), invokeConstructor(java.lang.Object[])

WebLogic Process Integrator Version 1.1

WebLogic and Process Integrator are trademarks of BEA Systems, Inc.
Copyright (c) 2000 BEA Systems, Inc., 8920 Woodbine Avenue, Suite 400,
Markham, Ontario L3R 9W9 Canada. All rights reserved.