public abstract class AbstractService extends java.lang.Object implements Service
Service.STATE| Constructor and Description |
|---|
AbstractService(java.lang.String name)
Construct the service.
|
| Modifier and Type | Method and Description |
|---|---|
HiveConf |
getHiveConf()
Get the configuration of this service.
|
java.lang.String |
getName()
Get the name of this service.
|
Service.STATE |
getServiceState()
Get the current service state
|
long |
getStartTime()
Get the service start time
|
void |
init(HiveConf hiveConf)
Initialize the service.
|
void |
register(ServiceStateChangeListener l)
Register an instance of the service state change events.
|
void |
start()
Start the service.
|
void |
stop()
Stop the service.
|
void |
unregister(ServiceStateChangeListener l)
Unregister a previously instance of the service state change events.
|
public AbstractService(java.lang.String name)
name - service namepublic Service.STATE getServiceState()
ServicegetServiceState in interface Servicepublic void init(HiveConf hiveConf)
Service.STATE.NOTINITED to Service.STATE.INITED unless the
operation failed and an exception was raised.public void start()
Service.STATE.INITED to Service.STATE.STARTED unless the
operation failed and an exception was raised.public void stop()
public void register(ServiceStateChangeListener l)
Servicepublic void unregister(ServiceStateChangeListener l)
Serviceunregister in interface Servicel - the listener to unregister.public java.lang.String getName()
Servicepublic HiveConf getHiveConf()
ServicegetHiveConf in interface Servicepublic long getStartTime()
ServicegetStartTime in interface ServiceCopyright © 2012 The Apache Software Foundation