org.exolab.core.service
Interface Serviceable

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
Service

public interface Serviceable
extends java.io.Serializable

This interface defines a protocol for serviceable objects. A serviceable object is one that can be controlled through start, stop etc.

Version:
$Revision: 1.2 $ $Date: 2001/10/07 07:28:05 $
Author:
Jim Alateras
See Also:
BasicService

Method Summary
 java.lang.String getName()
          Return the name of the service
 ServiceState getState()
          Return the current state of the service
 void restart()
          Convenience method for restarting the service.
 void start()
          Start the service.
 void stop()
          Stop the service.
 

Method Detail

start

public void start()
           throws ServiceException
Start the service.

Throws:
ServiceException - if the service fails to start, or is already running

stop

public void stop()
          throws ServiceException
Stop the service.

Throws:
ServiceException - if the service fails to stop, or is already stopped

restart

public void restart()
             throws ServiceException
Convenience method for restarting the service. This operation can be called regardless the current state of the service.

Throws:
ServiceException - if the service fails to restart

getState

public ServiceState getState()
Return the current state of the service

Returns:
the current state of the service

getName

public java.lang.String getName()
Return the name of the service

Returns:
the name of the service


Copyright © 1999-2005 The Exolab Group. All Rights Reserved.