|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.service.Service
public abstract class Service
Generic service associated to a component or an application. The life cycle
of a service is tightly related to the one of the associated component or
application.
If you want to use a specific service, you can always disable it before it is
actually started via the setEnabled(boolean) method.
| Constructor Summary | |
|---|---|
Service()
Constructor. |
|
Service(boolean enabled)
Constructor. |
|
| Method Summary | |
|---|---|
Filter |
createInboundFilter(Context context)
Create the filter that should be invoked for incoming calls. |
Filter |
createOutboundFilter(Context context)
Create the filter that should be invoked for outgoing calls. |
Context |
getContext()
Returns the context. |
boolean |
isEnabled()
Indicates if the service should be enabled. |
boolean |
isStarted()
Indicates if the service is started. |
boolean |
isStopped()
Indicates if the service is stopped. |
void |
setContext(Context context)
Sets the context. |
void |
setEnabled(boolean enabled)
Indicates if the service should be enabled. |
void |
start()
Starts the Restlet. |
void |
stop()
Stops the Restlet. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Service()
public Service(boolean enabled)
enabled - True if the service has been enabled.| Method Detail |
|---|
public Filter createInboundFilter(Context context)
context - The current context.
public Filter createOutboundFilter(Context context)
context - The current context.
Context.getClientDispatcher()public Context getContext()
public boolean isEnabled()
public boolean isStarted()
public boolean isStopped()
public void setContext(Context context)
context - The context.public void setEnabled(boolean enabled)
enabled - True if the service should be enabled.
public void start()
throws Exception
Exception
public void stop()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||