OpenCOM
Class OCM_MultiReceptacle<InterfaceType>
java.lang.Object
OpenCOM.OCM_MultiReceptacle<InterfaceType>
- All Implemented Interfaces:
- IReceptacle
public class OCM_MultiReceptacle<InterfaceType>
- extends java.lang.Object
- implements IReceptacle
Programming abstraction for a multi-receptacle. Multiple components all
implementing the same interface type can be connected to this receptacle.
An index is then use to invoke one or more of the connections e.g.
public OCM_MultiReceptacle m_PSR_IIntfType
= new OCM_MultiReceptacle(IInterfaceType.class);
m_PSR_IIntfType.interfaceList.get(index).foo(params);
|
Field Summary |
java.lang.Class |
class_type
Interface type of this receptacle. |
java.util.Vector<InterfaceType> |
interfaceList
List of interface pointers this receptacle is connected to. |
|
Method Summary |
boolean |
connectToRecp(IUnknown pIUnkSink,
java.lang.String riid,
long provConnID)
This method connects the recpetacle to given component on the given interface type. |
boolean |
disconnectFromRecp(long connID)
This method disconnects a given receptacle |
TypedAttribute |
getValue(java.lang.String name)
This method gets the value of a named meta-data attribute. |
java.util.Hashtable |
getValues()
This method returns all name-value meta-data pairs on this receptacle instance. |
boolean |
putData(java.lang.String name,
java.lang.String type,
java.lang.Object value)
This method adds meta-data name-value pair attributes to the receptacle instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
class_type
public java.lang.Class class_type
- Interface type of this receptacle.
interfaceList
public java.util.Vector<InterfaceType> interfaceList
- List of interface pointers this receptacle is connected to.
OCM_MultiReceptacle
public OCM_MultiReceptacle(java.lang.Class<InterfaceType> cls_type)
- Constructor creates a new instance of OCM_MultiReceptacle object. Usually called
from within OpenCOM component constructors.
- Parameters:
interfaceType - The type of interface to initialse this receptacle to
connectToRecp
public boolean connectToRecp(IUnknown pIUnkSink,
java.lang.String riid,
long provConnID)
- This method connects the recpetacle to given component on the given interface type.
- Specified by:
connectToRecp in interface IReceptacle
- Parameters:
pIUnkSink - Reference to the sink component who hosts the interface that the receptacle is to be connected to.riid - A string representing the interface type of the connection.
- Returns:
- A boolean indicating the success of this operation
disconnectFromRecp
public boolean disconnectFromRecp(long connID)
- This method disconnects a given receptacle
- Specified by:
disconnectFromRecp in interface IReceptacle
- Returns:
- A boolean indicating the success of this operation
putData
public boolean putData(java.lang.String name,
java.lang.String type,
java.lang.Object value)
- This method adds meta-data name-value pair attributes to the receptacle instance.
- Specified by:
putData in interface IReceptacle
- Parameters:
name - The attribute name.type - The attribute name.value - An Object holding the attribute value.
- Returns:
- A boolean describing if the pair was added or not.
getValue
public TypedAttribute getValue(java.lang.String name)
- This method gets the value of a named meta-data attribute.
- Specified by:
getValue in interface IReceptacle
- Parameters:
name - The attribute name.
- Returns:
- The TypedAttribute object storing the value.
getValues
public java.util.Hashtable getValues()
- This method returns all name-value meta-data pairs on this receptacle instance.
- Specified by:
getValues in interface IReceptacle
- Returns:
- A Hashtable storing the pairs.