Interface IAgent

All Superinterfaces:
IExtendedPluginValue
All Known Subinterfaces:
IActivePivotContinuousQuery<ResultT,UpdateT>, IActivePivotManager, IActivePivotSchema, IContinuousQuery<R,U>, IDistributedAgent, IDistributedHierarchyManager, IDistributedMessenger, IDrillthroughContinuousQuery, IDrillthroughStream, IGetAggregatesContinuousQuery, IInstanceDistributionManager, IMdxStream, IMonitoringStream, IMultiGetAggregatesNotificationContinuousQuery, IMultiVersionActivePivot, IMultiVersionDataActivePivot, IMultiVersionDistributedActivePivot, IStream<Q>, IStreamWithRanges<Q>
All Known Implementing Classes:
AActivePivotContinuousQuery, AActivePivotStream, AAtomicAgent, ActivePivotManager, ActivePivotSchema, ActivePivotSchemaDist, ADataNodeDistributedAgent, ADelegateStream, ADistributedAgent, ADistributedMessenger, AJGroupsMessenger, AKpiMonitoringStream, AMapDelegateStream, AMdxStream, AMonitoringStream, AQueryNodeDistributedAgent, AStream, DataInstanceDistributionManager, DelegateActivePivotManager, DistributedHierarchyManager, DrillthroughContinuousQuery, DrillthroughStream, GetAggregatesContinuousQuery, GetAggregatesStream, KpiMonitoringStream, LocalMessenger, LogNettyMessenger, MapDrillthroughStream, MapGetAggregatesStream, MdxDrillthroughStream, MdxStream, MonitoredMdxStream, MonitoredStreamPublisher, MultiGetAggregatesNotificationContinuousQuery, MultiVersionActivePivot, MultiVersionDataActivePivot, MultiVersionDistributedActivePivot, NettyMessenger, NotificationMdxStream, SentinelMdxStream, StreamPublisher

public interface IAgent extends IExtendedPluginValue
An agent is a state machine.
Author:
ActiveViam
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Business logic performed during an agent state transition.
    static enum 
    Enumeration of the possible states of an agent.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the properties with which this agent has been initialized, or null if this method is called before the initialization.
    Returns the current state of this agent.
    void
    Initializes the agent with a set of properties.
    void
    Pauses the agent.
    void
    Resumes the agent.
    void
    Starts the agent.
    void
    Definitely stops the agent.

    Methods inherited from interface com.quartetfs.fwk.types.IExtendedPluginValue

    getType
  • Method Details

    • init

      void init(Properties props) throws AgentException
      Initializes the agent with a set of properties.

      Those properties will be advertised by the implementors.

      Parameters:
      props - The properties used to initialize this agent.
      Throws:
      AgentException - if the call fails.
    • getProperties

      Properties getProperties()
      Returns the properties with which this agent has been initialized, or null if this method is called before the initialization.
      Returns:
      the properties with which this agent has been initialized.
    • getStatus

      IAgent.State getStatus()
      Returns the current state of this agent.
      Returns:
      The current state of this agent.
    • start

      void start() throws AgentException
      Starts the agent. The agent starts performing its operations.

      An exception will be thrown if it has been paused or started before.

      Starting the agent after it has been stopped is not supported. This kind of lifecycle operation should be done using pause() and resume().

      Throws:
      AgentException - if the call fails.
    • pause

      void pause() throws AgentException
      Pauses the agent. The agent stops its operations and does not perform work anymore. The agent can be resumed in order to perform work again.

      An exception will be thrown if the pause does not follow a start() or if the agent has already been stopped or paused.

      Throws:
      AgentException - if the call fails.
    • resume

      void resume() throws AgentException
      Resumes the agent. The agent resumes its operations and performs work again.

      An exception will be thrown if the resume does not follow a pause() or if the agent has already been stopped.

      Throws:
      AgentException - if the call fails.
    • stop

      void stop() throws AgentException
      Definitely stops the agent. This operation is equivalent to a shutdown operation of the agent, and it cannot be restarted.

      To pause and later resume the agent use the appropriate pause() and resume() APIs.

      An exception will be thrown if the agent is already stopped.

      Throws:
      AgentException - if the call fails.