Oracle Coherence for C++ API
Release 3.6.1.0

E18813-01

Controllable Class Reference

#include <coherence/util/Controllable.hpp>

Inherits Object.

Inherited by Service [virtual].

List of all members.


Detailed Description

The Controllable interface represents a configurable dameon-like object, quite oftenly referred to as a service, that usually operates on its own thread and has a controllable life cycle.
Author:
jh 2007.12.12

Public Types

typedef spec::Handle  Handle
  Controllable Handle definition.
typedef spec::View  View
  Controllable View definition.
typedef spec::Holder  Holder
  Controllable Holder definition.

Public Member Functions

virtual void  configure (XmlElement::View vXml)=0
  Configure the controllable service.
virtual bool  isRunning () const =0
  Determine whether or not the controllable service is running.
virtual void  start ()=0
  Start the controllable service.
virtual void  shutdown ()=0
  Stop the controllable service.
virtual void  stop ()=0
  Hard-stop the controllable service.

Member Function Documentation

virtual void configure ( XmlElement::View  vXml  )  [pure virtual]

Configure the controllable service.

This method can only be called before the controllable service is started.

Parameters:
vXml  an XmlElement carrying configuration information specific to the Controllable object
virtual void IllegalStateException thrown if the service is already running virtual void IllegalArgumentException thrown if the configuration information is invalid

virtual bool isRunning (  )  const [pure virtual]

Determine whether or not the controllable service is running.

This method returns false before a service is started, while the service is starting, while a service is shutting down and after the service has stopped. It only returns true after completing its start processing and before beginning its shutdown processing.

Returns:
true if the service is running; false otherwise

virtual void start (  )  [pure virtual]

Start the controllable service.

This method should only be called once per the life cycle of the Controllable service. This method has no affect if the service is already running.

virtual void IllegalStateException thrown if a service does not support being re-started, and the service was already started and subsequently stopped and then an attempt is made to start the service again; also thrown if the Controllable service has not been configured

virtual void shutdown (  )  [pure virtual]

Stop the controllable service.

This is a controlled shut-down, and is preferred to the stop() method.

This method should only be called once per the life cycle of the controllable service. Calling this method for a service that has already stopped has no effect.

virtual void stop (  )  [pure virtual]

Hard-stop the controllable service.

Use shutdown() for normal service termination. Calling this method for a service that has already stopped has no effect.


The documentation for this class was generated from the following file:
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.