public final class JILocalCoClass extends Object implements Serializable
Represents a Java COCLASS.
Please refer to MSInternetExplorer, Test_ITestServer2_Impl, SampleTestServer
and MSShell examples for more details on how to use this class.
| Constructor and Description |
|---|
JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition,
Class clazz)
Creates a local class instance.
|
JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition,
Class clazz,
boolean useInterfaceDefinitionIID)
|
JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition,
Object instance)
Creates a local class instance.
|
JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition,
Object instance,
boolean useInterfaceDefinitionIID)
Creates a local class instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInterfaceDefinition(JILocalInterfaceDefinition interfaceDefinition,
Class clazz)
Add another interface definition and it's class.
|
void |
addInterfaceDefinition(JILocalInterfaceDefinition interfaceDefinition,
Object instance)
Add another interface definition and it's supporting object instance.
|
boolean |
equals(Object target) |
String |
getCoClassIID()
Returns the interface identifier of this COCLASS.
|
JILocalInterfaceDefinition |
getInterfaceDefinition()
Returns the primary interfaceDefinition.
|
JILocalInterfaceDefinition |
getInterfaceDefinition(String IID)
Returns the interface definition based on the IID of the interface.
|
Class |
getServerClass()
Returns the actual class representing the interface definition.
|
Object |
getServerInstance()
Returns the instance representing the interface definition.
|
int |
hashCode() |
boolean |
isCoClassUnderRealIID()
Returns
true if the primary interface definition represents a real IID . |
void |
setSupportedEventInterfaces(List listOfIIDs)
Sets the interface identifiers (
IIDs) of the event interfaces this class would support. |
public JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition, Class clazz)
clazz
using Class.newInstance. Make sure that clazz has a visible null
constructor.interfaceDefinition - implementing structurally the definition of the COM callback interface.clazz - class to instantiate for serving requests from COM client. Must implement
the interfaceDefinition fully.IllegalArgumentException - if interfaceDefinition or clazz are null.public JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition, Class clazz, boolean useInterfaceDefinitionIID)
interfaceDefinition - implementing structurally the definition of the COM callback interface.clazz - class to instantiate for serving requests from COM client. Must implement
the interfaceDefinition fully.useInterfaceDefinitionIID - true if the IID of interfaceDefinitionIUnknown* is required.
For all JIObjectFactory.attachEventHandler(IJIComObject, String, IJIComObject) operations this should be set to
false since the IConnectionPoint::Advise method takes in a IUnknown* reference.IllegalArgumentException - if interfaceDefinition or clazz are null.public JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition, Object instance)
interfaceDefinition - implementing structurally the definition of the COM callback interface.instance - instance for serving requests from COM client. Must implement
the interfaceDefinition fully.IllegalArgumentException - if interfaceDefinition or instance are null.public JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition, Object instance, boolean useInterfaceDefinitionIID)
interfaceDefinition - implementing structurally the definition of the COM callback interface.instance - instance for serving requests from COM client. Must implement
the interfaceDefinition fully.useInterfaceDefinitionIID - true if the IID of interfaceDefinitionIUnknown* is required.
For all JIObjectFactory.attachEventHandler(IJIComObject, String, IJIComObject) operations this should be set to
false since the IConnectionPoint::Advise method takes in a IUnknown* reference.IllegalArgumentException - if interfaceDefinition or instance are null.public void setSupportedEventInterfaces(List listOfIIDs)
IIDs) of the event interfaces this class would support. This in case the same
clazz or instance is implementing more than one IID.listOfIIDs - JILocalCoClass(JILocalInterfaceDefinition, Class),
JILocalCoClass(JILocalInterfaceDefinition, Object)public void addInterfaceDefinition(JILocalInterfaceDefinition interfaceDefinition, Object instance)
interfaceDefinition - implementing structurally the definition of the COM callback interface.instance - instance for serving requests from COM client. Must implement
the interfaceDefinition fully.IllegalArgumentException - if interfaceDefinition or instance are null.public void addInterfaceDefinition(JILocalInterfaceDefinition interfaceDefinition, Class clazz)
interfaceDefinition - implementing structurally the definition of the COM callback interface.clazz - instance for serving requests from COM client. Must implement
the interfaceDefinition fully.IllegalArgumentException - if interfaceDefinition or clazz are null.public Object getServerInstance()
JILocalCoClass(JILocalInterfaceDefinition, Object)public Class getServerClass()
JILocalCoClass(JILocalInterfaceDefinition, Class)public String getCoClassIID()
public JILocalInterfaceDefinition getInterfaceDefinition()
public JILocalInterfaceDefinition getInterfaceDefinition(String IID)
null if no interface definition matching the IID has been found.public boolean isCoClassUnderRealIID()
Returns true if the primary interface definition represents a real IID .
Copyright © 2017 LSST. All rights reserved.