|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Basic service interface. All JWeb services that can be created and managed by JWeb application contexts must implement this interface.
| Field Summary | |
static int |
SERVICE_STATUS_CREATED
Service is created but not configured. |
static int |
SERVICE_STATUS_NOT_AVAILABLE
Service is not available. |
static int |
SERVICE_STATUS_READY
Service is ready for use, but not started yet. |
static int |
SERVICE_STATUS_RESUMING
Service is resuming. |
static int |
SERVICE_STATUS_RUNNING
Service is up and running. |
static int |
SERVICE_STATUS_STARTING
Service is in starting process |
static int |
SERVICE_STATUS_STOPPED
Service is stopped and cannot be used |
static int |
SERVICE_STATUS_STOPPING
Service is in stopping process |
static int |
SERVICE_STATUS_SUSPENDED
Service is suspended and cannot be used |
| Method Summary | |
void |
checkContext(IContext context)
This checks if the given context is a valid context for the service. |
java.lang.String[] |
getDependencies()
|
int |
getLogLevel()
This method returns if the application actually is running in debugging mode and so printing more detailed information on errors |
java.lang.String |
getName()
Get the service's name. |
int |
getStatus(ITicket ticket)
Returns the current status of the service |
java.lang.String |
getType()
Get the service's type. |
void |
resume(ITicket ticket)
Resume the service |
void |
setContext(IContext context,
ITicket user)
Change the service's context. |
void |
setDependencies(java.lang.String[] dependencies)
|
void |
setLogLevel(int level)
With this method debugging mode can be switched on and off |
void |
shutdown(ITicket ticket)
Shutdown the service |
void |
start(ITicket ticket)
Start the service with the given configuration. |
void |
suspend(ITicket ticket)
Suspend the service |
| Methods inherited from interface org.jwarp.service.configuration.IConfigurable |
configure |
| Methods inherited from interface org.jwarp.common.IExceptionProvider |
addExceptionListener, getExceptionListeners, removeAllExceptionListeners, removeExceptionListener |
| Field Detail |
public static final int SERVICE_STATUS_NOT_AVAILABLE
public static final int SERVICE_STATUS_CREATED
public static final int SERVICE_STATUS_READY
public static final int SERVICE_STATUS_RUNNING
public static final int SERVICE_STATUS_STOPPED
public static final int SERVICE_STATUS_SUSPENDED
public static final int SERVICE_STATUS_STARTING
public static final int SERVICE_STATUS_STOPPING
public static final int SERVICE_STATUS_RESUMING
| Method Detail |
public java.lang.String getType()
public java.lang.String getName()
public void start(ITicket ticket)
throws ServiceInitializationException,
java.lang.SecurityException
ServiceInitializationException - If the service could not startedjava.lang.SecurityException - If access was denied.
public void shutdown(ITicket ticket)
throws ServiceRuntimeException,
java.lang.SecurityException
ticket - The user ticketServiceRuntimeException - If the service could not be shut ownjava.lang.SecurityException - If access was denied.
public void suspend(ITicket ticket)
throws ServiceRuntimeException,
java.lang.SecurityException
ticket - The user ticketServiceRuntimeException - If the service could not be suspendedjava.lang.SecurityException - If access was denied.
public void resume(ITicket ticket)
throws ServiceRuntimeException,
java.lang.SecurityException
ticket - The user ticketServiceRuntimeException - If the service could not be resumedjava.lang.SecurityException - If access was denied.
public int getStatus(ITicket ticket)
throws java.lang.SecurityException
ticket - The user ticketjava.lang.SecurityException - If access was denied.public java.lang.String[] getDependencies()
public void setDependencies(java.lang.String[] dependencies)
public void checkContext(IContext context)
throws java.lang.SecurityException
The - contextjava.lang.SecurityException - If the context is invalid
public void setContext(IContext context,
ITicket user)
throws java.lang.SecurityException
context - The contextuser - The userjava.lang.SecurityException - If the context is invalidpublic int getLogLevel()
public void setLogLevel(int level)
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||