|
SunSPOT API V5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.spot.service.BasicService
public abstract class BasicService
A stub class for those simple services that do not run in their own threads.
Field Summary |
---|
Fields inherited from interface com.sun.spot.service.IService |
---|
PAUSED, PAUSING, READY, RESUMING, RUNNING, STARTING, STOPPED, STOPPING |
Constructor Summary | |
---|---|
BasicService()
|
Method Summary | |
---|---|
boolean |
getEnabled()
Return whether service is started automatically on reboot. |
abstract String |
getServiceName()
Return the name of this service. |
int |
getStatus()
Return the current status of this service. |
boolean |
isRunning()
Return whether the service is currently running. |
boolean |
pause()
Pause the service, and return whether successful. |
boolean |
resume()
Resume the service, and return whether successful. |
void |
setEnabled(boolean enable)
Enable/disable whether service is started automatically. |
void |
setServiceName(String who)
Assign a name to this service. |
boolean |
start()
Start the service, and return whether successful. |
boolean |
stop()
Stop the service, and return whether successful. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicService()
Method Detail |
---|
public boolean start()
IService
start
in interface IService
public boolean stop()
IService
stop
in interface IService
public boolean pause()
IService
pause
in interface IService
public boolean resume()
IService
resume
in interface IService
public int getStatus()
IService
getStatus
in interface IService
public boolean isRunning()
IService
isRunning
in interface IService
public abstract String getServiceName()
IService
getServiceName
in interface IService
public void setServiceName(String who)
IService
setServiceName
in interface IService
who
- the name for this servicepublic boolean getEnabled()
IService
getEnabled
in interface IService
public void setEnabled(boolean enable)
IService
setEnabled
in interface IService
enable
- true if the service should be started automatically on reboot
|
SunSPOT API V5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |