Interface ServiceControllerAction

All Superinterfaces:
Action
All Known Implementing Classes:
DummyService

public interface ServiceControllerAction extends Action
Action for controlling services installed under the extensions system. A factory may return the same or a different action on each invokation, but the action must control the same service. The actions should not store state internally. Eg. if there are two different controllers for the same extension the isRunning() method should always return the same value on both of them and invoking start() or stop() on one controller should be immediately visible on the second controller.
Version:
2.8
Author:
nicklas
Last modified
$Date: 2008-09-11 22:05:50 +0200 (to, 11 sep 2008) $
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Is the service running or not?
    void
    Start the service if it is not already running.
    void
    Stop the service if it is running.
  • Method Details

    • isRunning

      boolean isRunning()
      Is the service running or not?
    • start

      void start()
      Start the service if it is not already running. If this method is called on a running service it should do nothing. If the service can't be started it may throw an exception.
    • stop

      void stop()
      Stop the service if it is running. If this method is called on a service that is not running, it should do nothing. If the service can't be stopped it may throw an exception.