OpenCOM
Interface IOpenCOM

All Superinterfaces:
IUnknown
All Known Implementing Classes:
OpenCOM

public interface IOpenCOM
extends IUnknown

Java Interface describing the methods of OpenCOM runtime kernel. The primary runtime operations are: create, delete connect, disconnect, and the meta-operations are list components, get component name etc. Note: This is a direct attempt to port the OpenCOM v1 interface to Java


Method Summary
 long connect(IUnknown pSourceComponentIUnk, IUnknown ComponentIUnk, java.lang.String InterfaceType)
          Connects a receptacle on the Source component to an interface on the Sink component.
 java.lang.Object createInstance(java.lang.String componentType, java.lang.String componentName)
          Create a new instance of a component and insert it into the OpenCOM runtime.
 boolean deleteInstance(IUnknown pComponentIUnknown)
          Deletes a component instance which has been previously created.
 boolean disconnect(long connID)
          Disconnects a receptacle from an interface.
 int enumComponents(java.util.Vector<IUnknown> ppComps)
          Fills the given Vector with the complete set of components currently instantiated in the runtime.
 java.lang.Class getComponentCLSID(IUnknown pIUnknown)
          Returns the registered component type of a given component instantiation.
 java.lang.String getComponentName(IUnknown pIUnknown)
          Returns the registered unique component name for a given component reference.
 IUnknown getComponentPIUnknown(java.lang.String name)
          Returns the registered component reference of a named component.
 OCM_ConnInfo_t getConnectionInfo(long connID)
          Returns meta-information about a given connection.
 
Methods inherited from interface OpenCOM.IUnknown
QueryInterface
 

Method Detail

createInstance

java.lang.Object createInstance(java.lang.String componentType,
                                java.lang.String componentName)
Create a new instance of a component and insert it into the OpenCOM runtime. Ideally, the creator should cast the resulting component to IUnknown to enable OpenCOM style programming.

Parameters:
componentType - the string describing the component type i.e. the Java class of the component.
componentName - the string represting the unique (user defined) name of the component.
Returns:
an Object that is the reference to the created component. Null indicates failure.
See Also:
Object

deleteInstance

boolean deleteInstance(IUnknown pComponentIUnknown)
Deletes a component instance which has been previously created.

Parameters:
pComponentIUnknown - an IUnknown reference of the component to delete.
Returns:
Indication of success or failure of operation.
See Also:
IUnknown

connect

long connect(IUnknown pSourceComponentIUnk,
             IUnknown ComponentIUnk,
             java.lang.String InterfaceType)
Connects a receptacle on the Source component to an interface on the Sink component.

Parameters:
pSourceComponentIUnk - Reference to component with the receptacle.
pSinkComponentIUnk - Reference to component with the interface.
InterfaceType - a string describing the interface type of the connection.
Returns:
a long describing the unique connection identifier generated by the run-time.
See Also:
IUnknown

disconnect

boolean disconnect(long connID)
Disconnects a receptacle from an interface.

Parameters:
connID - a long describing the unique identifier of the connection to destroy.
Returns:
Indication of success or failure of operation.

getConnectionInfo

OCM_ConnInfo_t getConnectionInfo(long connID)
Returns meta-information about a given connection.

Parameters:
connID - a long describing the unique identifier of the connection to inspect.
Returns:
meta-information about the connection. e.g. Source, Sink, Interface type. Null indicates operation failure.
See Also:
OCM_ConnInfo_t

enumComponents

int enumComponents(java.util.Vector<IUnknown> ppComps)
Fills the given Vector with the complete set of components currently instantiated in the runtime.

Parameters:
ppComps - Vector to fill with IUnknown pointers of current components.
Returns:
an integer describing the number of components currently in the run-time.

getComponentName

java.lang.String getComponentName(IUnknown pIUnknown)
Returns the registered unique component name for a given component reference.

Parameters:
pIUnknown - an IUnknown reference describing a component instantiation.
Returns:
a string describing the unique name of the component.
See Also:
IUnknown

getComponentPIUnknown

IUnknown getComponentPIUnknown(java.lang.String name)
Returns the registered component reference of a named component.

Parameters:
name - a string describing the unique name of the component.
Returns:
an IUnknown reference describing the instantiation of the component.
See Also:
IUnknown

getComponentCLSID

java.lang.Class getComponentCLSID(IUnknown pIUnknown)
Returns the registered component type of a given component instantiation. In this case the Java class describing the component.

Parameters:
pIUnknown - an IUnknown reference describing a component instantiation.
Returns:
- Class of component.
See Also:
IUnknown, Class