|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectOpenCOM.OCM_MultiReceptacleContext<InterfaceType>
public class OCM_MultiReceptacleContext<InterfaceType>
Programming abstraction for a multi-receptacle with context selection. Multiple components all implementing the same interface type can be connected to this receptacle. Only the connection matching the full set of context rules is invoked
public OCM_MultiReceptacleContext<IInterfaceType> m_PSR_IIntfType = new OCM_MultiReceptacleContext<IInterfaceType>(IInterfaceType.class);
m_PSR_IIntfType.setContext("Attr1", "Val1");
m_PSR_IIntfType.setContext("Attr2", "Val2");
m_PSR_IIntfType.m_pIntf.foo(params);
| Field Summary | |
|---|---|
java.lang.Class |
class_type
The interface type of this receptacle. |
InterfaceType |
m_pIntf
The receptacle endpoint to be invoked by the programmer. |
| Constructor Summary | |
|---|---|
OCM_MultiReceptacleContext(java.lang.Class<InterfaceType> cls_type)
Constructor creates a new instance of OCM_MultiReceptacleContext object. |
|
| Method Summary | |
|---|---|
void |
addContext(java.lang.String Name,
java.lang.Object Value)
Add a context rule to this receptacle (its a set of name-value pairs). |
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. |
void |
removeContext(java.lang.String Name)
Remove a previously entered context rule |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.lang.Class class_type
public InterfaceType m_pIntf
| Constructor Detail |
|---|
public OCM_MultiReceptacleContext(java.lang.Class<InterfaceType> cls_type)
cls_type - The type of interface to initialse this receptacle to| Method Detail |
|---|
public void addContext(java.lang.String Name,
java.lang.Object Value)
Name - The Attribute nameValue - The type of interface to initialse this receptacle topublic void removeContext(java.lang.String Name)
Name - The Attribute name
public boolean connectToRecp(IUnknown pIUnkSink,
java.lang.String riid,
long provConnID)
connectToRecp in interface IReceptaclepIUnkSink - 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.
public boolean disconnectFromRecp(long connID)
disconnectFromRecp in interface IReceptacle
public boolean putData(java.lang.String name,
java.lang.String type,
java.lang.Object value)
putData in interface IReceptaclename - The attribute name.type - The attribute name.value - An Object holding the attribute value.
public TypedAttribute getValue(java.lang.String name)
getValue in interface IReceptaclename - The attribute name.
public java.util.Hashtable getValues()
getValues in interface IReceptacle
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||