|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.resources.Resource
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 com.sun.spot.resources.Resource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.spot.resources.IResource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Constructor Detail |
|---|
public BasicService()
| Method Detail |
|---|
public boolean start()
IService
start in interface IServicepublic boolean stop()
IService
stop in interface IServicepublic boolean pause()
IService
pause in interface IServicepublic boolean resume()
IService
resume in interface IServicepublic int getStatus()
IService
getStatus in interface IServicepublic boolean isRunning()
IService
isRunning in interface IServicepublic abstract String getServiceName()
IService
getServiceName in interface IServicepublic void setServiceName(String who)
IService
setServiceName in interface IServicewho - the name for this servicepublic boolean getEnabled()
IService
getEnabled in interface IServicepublic void setEnabled(boolean enable)
IService
setEnabled in interface IServiceenable - true if the service should be started automatically on reboot
|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||