WebLogic Integration


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, Publishable, java.lang.Comparable

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.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
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.
ClassInvocationDescriptor(java.lang.String description, java.lang.String className, MethodDescriptor constructorDescriptor, java.lang.String[] constructorParmDescriptions, MethodDescriptor methodDescriptor, java.lang.String[] methodParmDescriptions, boolean published)
          Create a new class invocation descriptor object.
 
Method Summary
 java.lang.Object clone()
          Clone a ClassInvocationDescriptor instance.
 int compareTo(java.lang.Object o)
           
 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.Object getContents()
           
 java.lang.String getDescription()
          Return a human-readable description of the method invocation.
 java.lang.String getEntryName()
           
 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.String getObjectClassName()
          Gets the name of the class that the wrapped method is intended to be called on.
 java.lang.String getOwnerName()
           
 java.util.List getReferencedPublishables(java.util.Map publishables)
           
 int getType()
           
 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.
 boolean isPublished()
           
 void publish()
           
 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 set(java.lang.String description, java.lang.String className, MethodDescriptor constructorDescriptor, java.lang.String[] constructorParmDescriptions, MethodDescriptor methodDescriptor, java.lang.String[] methodParmDescriptions, boolean published)
          Update a class invocation descriptor.
 void setId(java.lang.String id)
          Set the unique identifier.
 void setObjectClassName(java.lang.String objectClassName)
          Sets the name of the class that the wrapped method is intended to be called on.
 void setPublished()
          Deprecated. Call publish() instead.
 
Methods inherited from class java.lang.Object
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.

ClassInvocationDescriptor

public ClassInvocationDescriptor(java.lang.String description,
                                 java.lang.String className,
                                 MethodDescriptor constructorDescriptor,
                                 java.lang.String[] constructorParmDescriptions,
                                 MethodDescriptor methodDescriptor,
                                 java.lang.String[] methodParmDescriptions,
                                 boolean published)
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.
published -  
Since:
WebLogic Process Integrator 2.0
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.

set

public void set(java.lang.String description,
                java.lang.String className,
                MethodDescriptor constructorDescriptor,
                java.lang.String[] constructorParmDescriptions,
                MethodDescriptor methodDescriptor,
                java.lang.String[] methodParmDescriptions,
                boolean published)
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.
published -  
Since:
WebLogic Process Integrator 2.0

setObjectClassName

public void setObjectClassName(java.lang.String objectClassName)
Sets the name of the class that the wrapped method is intended to be called on. Note that this is different from the class that the method is declared on for methods inherited from superclasses.

Since:
WebLogic Process Integrator 2.0 SP3

getObjectClassName

public java.lang.String getObjectClassName()
Gets the name of the class that the wrapped method is intended to be called on. Note that this is different from the class that the method is declared on for methods inherited from superclasses.

Since:
WebLogic Process Integrator 2.0 SP3

clone

public java.lang.Object clone()
Clone a ClassInvocationDescriptor instance.

Returns:
a clone instance of ClassInvocationDescriptor.
Overrides:
clone in class java.lang.Object
Since:
WebLogic Process Integrator 2.0

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)

isPublished

public boolean isPublished()
Specified by:
isPublished in interface Publishable

Since:
WebLogic Process Integrator 2.0

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[])

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable


setPublished

public void setPublished()
Deprecated. Call publish() instead.


publish

public void publish()
Specified by:
publish in interface Publishable


getContents

public java.lang.Object getContents()
Specified by:
getContents in interface Publishable


getEntryName

public java.lang.String getEntryName()
Specified by:
getEntryName in interface Publishable


getType

public int getType()
Specified by:
getType in interface Publishable


getOwnerName

public java.lang.String getOwnerName()
Specified by:
getOwnerName in interface Publishable


getReferencedPublishables

public java.util.List getReferencedPublishables(java.util.Map publishables)
Specified by:
getReferencedPublishables in interface Publishable


WebLogic Integration

WebLogic Integration (WLI)