Package com.altova.automation.libs
Class COMIDispatchObject
java.lang.Object
com.altova.automation.libs.COMIUnknownObject
com.altova.automation.libs.COMIDispatchObject
- Direct Known Subclasses:
AppOutputLine,AppOutputLines,AppOutputLineSymbol,AuthenticContextMenu,AuthenticDataTransfer,AuthenticEvent,AuthenticEventContext,AuthenticRange,AuthenticSelection,AuthenticView,AutomationServer,CodeGeneratorDlg,DatabaseConnection,Dialogs,Document,Documents,DTDSchemaGeneratorDlg,ElementList,ElementListItem,ExportSettings,FileSelectionDlg,FindInFilesDlg,FindInFilesResult,FindInFilesResultMatch,FindInFilesResults,GenerateSampleXMLDlg,GridView,JSONSchemaDocumentationDlg,OldAuthenticView,RaptorXMLCommand,RaptorXMLCommands,RaptorXMLConfiguration,RaptorXMLConfigurations,RaptorXMLServer,RaptorXMLServers,SchemaDocumentationDlg,SpyProject,SpyProjectItem,SpyProjectItems,TextImportExportSettings,TextView,WSDL20DocumentationDlg,WSDLDocumentationDlg,XBRLDocumentationDlg,XMLData
public class COMIDispatchObject extends COMIUnknownObject
Represents a COM object implementing IDispatch.
Only for IDispatch objects COM methods can be invoked and events be received.
- Since:
- 2011 Rel. 3
-
Field Summary
Fields Modifier and Type Field Description static shortDISPATCH_METHODstatic shortDISPATCH_PROPERTYGETstatic shortDISPATCH_PROPERTYPUTstatic shortDISPATCH_PROPERTYPUTREF -
Method Summary
Modifier and Type Method Description booleanaddListener(COMDispatchEvent i_listener)Add a new listener to events received for this COM object.JVariantgetProperty(int dispIdMember)Convenience wrapper to retrieve a COM property value,JVariantgetProperty(int dispIdMember, JVariant[] pDispParams)Convenience wrapper to retrieve a COM property value,JVariantinvoke(int dispIdMember, int dwFlags, JVariant[] pDispParams)Invoke any member of a COM IDispatch object.booleanremoveListener(COMDispatchEvent i_listener)Remove a specific listener form COM event receivers.voidsetProperty(int dispIdMember, JVariant newValue)Convenience method to set the value of a COM property.voidsetProperty(int dispIdMember, JVariant[] newValueArray)Convenience method to set the value of a COM property for setter functions that require additional parameters.Methods inherited from class com.altova.automation.libs.COMIUnknownObject
dispose, equals, getCOMInterfacePointer, isNull
-
Field Details
-
DISPATCH_METHOD
public static final short DISPATCH_METHOD- See Also:
- Constant Field Values
-
DISPATCH_PROPERTYGET
public static final short DISPATCH_PROPERTYGET- See Also:
- Constant Field Values
-
DISPATCH_PROPERTYPUT
public static final short DISPATCH_PROPERTYPUT- See Also:
- Constant Field Values
-
DISPATCH_PROPERTYPUTREF
public static final short DISPATCH_PROPERTYPUTREF- See Also:
- Constant Field Values
-
-
Method Details
-
getProperty
Convenience wrapper to retrieve a COM property value,- Parameters:
dispIdMember- - the property's COM ID- Returns:
- the property's value as a
JVariant. - Throws:
AutomationException
-
getProperty
Convenience wrapper to retrieve a COM property value,- Parameters:
dispIdMember- - the property's COM IDpDispParams- - additional parameters that the property access requires (as used for the Item property).- Returns:
- the property's value as a
JVariant. - Throws:
AutomationException
-
setProperty
Convenience method to set the value of a COM property.- Parameters:
dispIdMember- - the property's COM IDnewValue- - the new value for the property asJVariant.- Throws:
AutomationException
-
setProperty
Convenience method to set the value of a COM property for setter functions that require additional parameters.- Parameters:
dispIdMember- - the property's COM IDnewValueArray- - the new value for the property asJVariantand any additional parameters.- Throws:
AutomationException
-
invoke
public JVariant invoke(int dispIdMember, int dwFlags, JVariant[] pDispParams) throws AutomationExceptionInvoke any member of a COM IDispatch object.- Parameters:
dispIdMember- - COM ID of the member as defined in the IDL.dwFlags- - invocation flags selecting method call or setting or getting a property value.pDispParams- - parameters to the call. Mark out parameters with {JVariant.SetByRefFlag}.- Returns:
- parameter marked as [out,retval] in COM IDL.
- Throws:
AutomationException
-
addListener
Add a new listener to events received for this COM object. -
removeListener
Remove a specific listener form COM event receivers.
-