OpenCOM
Interface ICFMetaInterface

All Known Implementing Classes:
CFMetaInterface

public interface ICFMetaInterface

The ICFMetaInterface interface is implemented by all composite components. It supports operations to inspect and make changes to a composite component framework's internal meta-representation of component architecture. Hence, it supports the architecture meta-model for invidual component frameworks.


Method Summary
 boolean access_CF_graph_lock(int index)
          Each component framework implemnts a lock to prevent reconfiguration during functional operation.
 boolean break_local_bind(long connID)
          This method disconnects two components only if they both reside in the framework and are connected.
 boolean commit_arch_transaction()
          This method must be called by the reconfiguration agent at the end of the reconfiguration transaction.
 IUnknown create_component(java.lang.String className, java.lang.String componentName)
          This method creates the component within the framework.
 boolean delete_component(IUnknown pIUnknown)
          This method deletas the component from the framework.
 boolean expose_interface(java.lang.String rintf, IUnknown pComp)
          This method takes the interface from one of the framework's internal components and then makes it one of its own functional interfaces.
 boolean expose_receptacle(java.lang.String rintf, IUnknown pComp, java.lang.String recpType)
          This method takes the receptacle from one of the framework's internal components and then makes it one of its own receptacles.
 int get_bound_components(IUnknown comp, java.util.Vector<CFMetaInterface.ConnectedComponent> ppConnections)
          This method produces a list of components that are connected to a particular component within the framework.
 int get_exposed_interfaces(java.util.Vector<java.lang.String> ppIntfs)
          This method fills the vector passed as a parameter with the list of interfaces exposed by this framework.
 int get_exposed_receptacles(java.util.Vector<CFMetaInterface.ExposedReceptacle> ppComps)
          This method fills the vector passed as a parameter with the list of receptacles exposed by this framework.
 int get_internal_bindings(java.util.Vector<java.lang.Long> pConnIDS)
          This method returns all of the internal connections between components that are wholly within the framework.
 int get_internal_components(java.util.Vector<IUnknown> ppComps)
          This method fills the vector passed as a parameter with the references of all the components that reside locally within this framework.
 boolean init_arch_transaction()
          All reconfigurations must be performed as part of a transaction.
 boolean insert_component(IUnknown pCompReference)
          This method inserts a previously instantiated component from the runtime, into the framework instance.
 long local_bind(IUnknown pIUnkSource, IUnknown pIUnkSink, java.lang.String InterfaceType)
          This method binds together two components only if they both reside in the framework.
 boolean release_CF_graph_lock(int index)
          Releases the lock, previously acquired.
 boolean rollback_arch_transaction()
          Rolls the configuration back to its previous state - ideally should not be called directly; maybe if faults are being detected is a supposedly valid architecture you may wish to try returning to a stable version.
 boolean unexpose_all_interfaces()
          This method removes all exposed interfaces.
 boolean unexpose_all_receptacles()
          This method removes all exposed receptacles.
 boolean unexpose_interface(java.lang.String rintf, IUnknown pComp)
          This method removes the exposed interface from the outer component framework,
 boolean unexpose_receptacle(java.lang.String rintf, IUnknown pComp)
          This method removes the exposed receptacle from the outer component framework,
 int update_readers_count(int Value)
          Update the CF's locks readers count.
 

Method Detail

get_internal_components

int get_internal_components(java.util.Vector<IUnknown> ppComps)
This method fills the vector passed as a parameter with the references of all the components that reside locally within this framework.

Parameters:
ppComps - A vector to be filled with the references of inner components.
Returns:
The number of components within the framework.

get_bound_components

int get_bound_components(IUnknown comp,
                         java.util.Vector<CFMetaInterface.ConnectedComponent> ppConnections)
This method produces a list of components that are connected to a particular component within the framework.

Parameters:
comp - Instance of the component we wish to find what is connected to it.
ppConnections - Vector to be filled with the list of components that are connected to this component.
Returns:
An integer describing the number of components connected to this component.

get_internal_bindings

int get_internal_bindings(java.util.Vector<java.lang.Long> pConnIDS)
This method returns all of the internal connections between components that are wholly within the framework.

Parameters:
pConnIDS - A vector to be filled with long values describing the unique id of each connection.
Returns:
An integer describing the number of connections within the framework.

get_exposed_interfaces

int get_exposed_interfaces(java.util.Vector<java.lang.String> ppIntfs)
This method fills the vector passed as a parameter with the list of interfaces exposed by this framework. Its behaviour is similar to that provided by enumIntfs of OpenCOM.

Parameters:
ppIntfs - A vector to be filled with the list of interfaces.
Returns:
The number of interfaces exposed by this framework.

get_exposed_receptacles

int get_exposed_receptacles(java.util.Vector<CFMetaInterface.ExposedReceptacle> ppComps)
This method fills the vector passed as a parameter with the list of receptacles exposed by this framework. Its behaviour is similar to that provided by enumRecps of OpenCOM.

Parameters:
ppComps - A vector to be filled with the list of receptacles.
Returns:
The number of interfaces exposed by this framework.

local_bind

long local_bind(IUnknown pIUnkSource,
                IUnknown pIUnkSink,
                java.lang.String InterfaceType)
This method binds together two components only if they both reside in the framework.

Parameters:
pIUnkSource - The source component with the receptacle.
pIUnkSink - The sink component with the interface.
InterfaceType - The interface type to make the connection on.
Returns:
A long describing the unique ID of this new connection. -1 indicates failure to connect.
See Also:
IUnknown

break_local_bind

boolean break_local_bind(long connID)
This method disconnects two components only if they both reside in the framework and are connected.

Parameters:
connID - The unique ID of the connection to break.
Returns:
A boolean indicating if the disconnection was made.

create_component

IUnknown create_component(java.lang.String className,
                          java.lang.String componentName)
This method creates the component within the framework. The component is created, stored in the runtime, and inserted into this framework's meta-data.

Parameters:
componentType - The type of the component to create.
componentName - The unique name of the component to create.
Returns:
A reference to the newly created component instance.
See Also:
IUnknown

insert_component

boolean insert_component(IUnknown pCompReference)
This method inserts a previously instantiated component from the runtime, into the framework instance.

Parameters:
pCompReference - The reference of the component instance.
Returns:
A boolean indicating if the insert occured or not.
See Also:
IUnknown

delete_component

boolean delete_component(IUnknown pIUnknown)
This method deletas the component from the framework. The component is disconnected, deleted from the runtime, and this framework's meta-data is updated.

Parameters:
pIUnknown - The component instance to delete
Returns:
A boolean indicating if the component was deleted or not.
See Also:
IUnknown

expose_interface

boolean expose_interface(java.lang.String rintf,
                         IUnknown pComp)
This method takes the interface from one of the framework's internal components and then makes it one of its own functional interfaces.

Parameters:
rintf - The interface type that will be exposed.
pComp - The internal component hosting the the interface.
Returns:
A boolean describing if the interface was exposed.
See Also:
IUnknown

unexpose_interface

boolean unexpose_interface(java.lang.String rintf,
                           IUnknown pComp)
This method removes the exposed interface from the outer component framework,

Parameters:
rintf - The interface type that will be removed.
pComp - The internal component hosting the the interface.
Returns:
A boolean describing if the interface has been removed.

unexpose_all_interfaces

boolean unexpose_all_interfaces()
This method removes all exposed interfaces.

Returns:
A boolean describing if all the interfaces have been removed.

expose_receptacle

boolean expose_receptacle(java.lang.String rintf,
                          IUnknown pComp,
                          java.lang.String recpType)
This method takes the receptacle from one of the framework's internal components and then makes it one of its own receptacles.

Parameters:
rintf - The interface type that will be exposed.
pComp - The internal component hosting the the interface.
recpType - The type of the receptacle.
Returns:
A boolean describing if the receptacle was exposed.
See Also:
IUnknown

unexpose_receptacle

boolean unexpose_receptacle(java.lang.String rintf,
                            IUnknown pComp)
This method removes the exposed receptacle from the outer component framework,

Parameters:
rintf - The interface type that will be removed.
pComp - The internal component hosting the the receptacle.
Returns:
A boolean describing if the receptacle has been removed.

unexpose_all_receptacles

boolean unexpose_all_receptacles()
This method removes all exposed receptacles.

Returns:
A boolean describing if all the receptacle have been removed.

init_arch_transaction

boolean init_arch_transaction()
All reconfigurations must be performed as part of a transaction. Therefore, the reconfigure agent must first call this method before subsequent write operations.

Returns:
A boolean describing if the transaction can continue.

commit_arch_transaction

boolean commit_arch_transaction()
This method must be called by the reconfiguration agent at the end of the reconfiguration transaction. It forces a check on the new configuration, which is commited or not based upon the result.

Returns:
The boolean describes of the new configuration was commited. A false means that the last good configuration was rolled back to.

rollback_arch_transaction

boolean rollback_arch_transaction()
Rolls the configuration back to its previous state - ideally should not be called directly; maybe if faults are being detected is a supposedly valid architecture you may wish to try returning to a stable version.

Returns:
A boolean describing if the roll back was a success.

access_CF_graph_lock

boolean access_CF_graph_lock(int index)
Each component framework implemnts a lock to prevent reconfiguration during functional operation. This method attempts to get read or write access to the lock based upon the input. The locking mechanism is readers, writers with priority for readers.

Parameters:
accessType - An integer describing acces type: 0 for read, 1 for write.
Returns:
A boolean describing if the lock has processed this request or not.

release_CF_graph_lock

boolean release_CF_graph_lock(int index)
Releases the lock, previously acquired.

Parameters:
accessType - An integer describing acces type: 0 for read, 1 for write.
Returns:
A boolean describing if the lock has processed this request or not.

update_readers_count

int update_readers_count(int Value)
Update the CF's locks readers count. Do not use - only used by runtime.

Parameters:
Value - increment amount.
Returns:
An integer describing the new reader count.