|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface that describes a service plugged into the jason server.
1°) A Service is initialized (init)
2°) A Service is started
3°) A Service is stopped
Look at the ServiceLoader
and ServicesManager
to see how
a service is used.
For sendind an message please, use the ServiceContect
AbstractService
,
ServiceContext
,
Runlevel
,
MessageHandler
,
ServiceVersion
Field Summary | |
static int |
ERROR_MESSAGE
|
static int |
INFORMATION_MESSAGE
|
static int |
VERBOSE_MESSAGE
|
static int |
WARNING_MESSAGE
|
Method Summary | |
boolean |
getBooleanProperty(java.lang.String name)
|
ServiceInfo |
getInfo()
|
int |
getIntProperty(java.lang.String name)
|
java.lang.String |
getName()
This name should distinguish your service from another one. |
java.lang.Object |
getProperty(java.lang.String name)
|
ServiceState |
getServiceState()
|
java.lang.String |
getStringProperty(java.lang.String name)
|
ServiceType |
getType()
This is an important function for cooperation, it says what it the role of a service such as a Web service. |
ServiceVersion |
getVersion()
|
void |
init(ServiceContext sc)
initialize the service, reading properties from the ServiceContext |
boolean |
isEnabled()
This method provides an indication for the JASon container for starting or not this service. |
boolean |
isOverride()
Note that this value can avoid your service to be taken into account. |
boolean |
isPrivate()
The AbstractService code will set this value to false by default |
boolean |
isVerbose()
|
ServiceResponse |
manageRequest(ServiceRequest request)
This method is useful for delegating a work to another service |
void |
restart()
restart the service |
void |
start()
start the service |
void |
stop()
stop the service |
Field Detail |
public static final int INFORMATION_MESSAGE
public static final int WARNING_MESSAGE
public static final int ERROR_MESSAGE
public static final int VERBOSE_MESSAGE
Method Detail |
public java.lang.String getName()
public ServiceVersion getVersion()
public ServiceInfo getInfo()
public boolean isVerbose()
public boolean isOverride()
public void init(ServiceContext sc)
public void start()
public void stop()
public void restart()
public java.lang.Object getProperty(java.lang.String name)
public java.lang.String getStringProperty(java.lang.String name)
public int getIntProperty(java.lang.String name)
public boolean getBooleanProperty(java.lang.String name)
public boolean isPrivate()
AbstractService
code will set this value to false
by default
true
if you don't want this service cooperate with other servicepublic ServiceType getType()
public boolean isEnabled()
true
public ServiceResponse manageRequest(ServiceRequest request) throws ServiceException
request
- A request for the service
ServiceException
- when the request is not managedpublic ServiceState getServiceState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |