org.jinterop.dcom.core
Class JILocalMethodDescriptor

java.lang.Object
  extended by org.jinterop.dcom.core.JILocalMethodDescriptor

public final class JILocalMethodDescriptor
extends java.lang.Object

Describe a method of the COM IDL to be used in Callback implementations. Framework uses java reflection to invoke methods requested by COM clients so it is absolutely essential that java methods in the implementation class conform exactly to what is described in this object.

Please refer to MSInternetExplorer, Test_ITestServer2_Impl, SampleTestServer and MSShell examples for more details on how to use this class.

Since:
2.0 (formerly JIMethodDescriptor)

Constructor Summary
JILocalMethodDescriptor(java.lang.String methodName, int dispId, JILocalParamsDescriptor parameters)
          Creates the method descriptor.
JILocalMethodDescriptor(java.lang.String methodName, JILocalParamsDescriptor parameters)
          Creates the method descriptor.
 
Method Summary
 int getMethodDispID()
          Gets the DISPID of this method.
 java.lang.String getMethodName()
          Returns the method name.
 int getMethodNum()
          Gets the opnum of this method in the order as defined in the IDL.
 JILocalParamsDescriptor getParameterObject()
          Returns the parameter object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JILocalMethodDescriptor

public JILocalMethodDescriptor(java.lang.String methodName,
                               JILocalParamsDescriptor parameters)
Creates the method descriptor. The method number is set by the order in which this instance is added to the JILocalInterfaceDefinition. This number is incremented by 1 for each subsequent and new addition into interface definition.

Parameters:
methodName - name of the method.
parameters - pass null if the method has no parameters.

JILocalMethodDescriptor

public JILocalMethodDescriptor(java.lang.String methodName,
                               int dispId,
                               JILocalParamsDescriptor parameters)
Creates the method descriptor.

Parameters:
methodName - name of the method.
dispId - DISPID of this method as in the IDL or the TypeLibrary.
parameters - pass null if the method has no parameters.
Method Detail

getMethodName

public java.lang.String getMethodName()
Returns the method name.

Returns:

getMethodNum

public int getMethodNum()
Gets the opnum of this method in the order as defined in the IDL.

Returns:

getMethodDispID

public int getMethodDispID()
Gets the DISPID of this method.

Returns:

getParameterObject

public JILocalParamsDescriptor getParameterObject()
Returns the parameter object.

Returns:
null if the method has no parameters.