cz.cuni.amis.pogamut.base.component.controller
Interface ISharedComponentController<COMPONENT extends ISharedComponent>

All Superinterfaces:
IComponent, IComponentControllerBase<COMPONENT>, ISharedComponent
All Known Implementing Classes:
SharedComponentController

public interface ISharedComponentController<COMPONENT extends ISharedComponent>
extends IComponentControllerBase<COMPONENT>, ISharedComponent

The component controller is meant for simple ISharedComponent NOT IComponents (for them, use IComponentController instead).

It is suitable for controlling lifecycle of one component inside one component bus. It provides methods for querying components the controlled component is depending on.


Method Summary
 boolean isDependent(IAgentId agentId, IComponent component)
          Whether the controlled component is dependent on 'component' of the agent identified by 'agentId'.
 boolean isDependent(IAgentId agentId, IToken componentId)
          Whether the controlled component is dependent on component (identified by 'componentId') of the agent identified by 'agentId'.
 boolean isUsedBy(IAgentId agentId)
          Tells whether the agent identified by 'agentId' is currently using the controlled component, i.e., this component controller registers the component to agent's ILifecycleBus and is watching it for auto start/stop/pause/resume/...
 
Methods inherited from interface cz.cuni.amis.pogamut.base.component.controller.IComponentControllerBase
awaitState, awaitState, fatalError, fatalError, getComponent, getComponentControl, getFatalError, getState, inState, isBroadcastingEvents, isPaused, isRunning, manualKill, manualPause, manualResume, manualStart, manualStartPaused, manualStop, notInState, setBroadcastingEvents
 
Methods inherited from interface cz.cuni.amis.pogamut.base.component.ISharedComponent
addComponentBus, removeComponentBus
 
Methods inherited from interface cz.cuni.amis.pogamut.base.component.IComponent
getComponentId
 

Method Detail

isUsedBy

boolean isUsedBy(IAgentId agentId)
Tells whether the agent identified by 'agentId' is currently using the controlled component, i.e., this component controller registers the component to agent's ILifecycleBus and is watching it for auto start/stop/pause/resume/...

Parameters:
agentId -
Returns:

isDependent

boolean isDependent(IAgentId agentId,
                    IToken componentId)
Whether the controlled component is dependent on component (identified by 'componentId') of the agent identified by 'agentId'.

Note that two IComponent belonging to different agents may have the same 'componentId'.

Parameters:
agentId -
componentId -
Returns:

isDependent

boolean isDependent(IAgentId agentId,
                    IComponent component)
Whether the controlled component is dependent on 'component' of the agent identified by 'agentId'.

Parameters:
component -
Returns: