|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ServiceManager
Managing the running Service in an application.
| Method Summary | |
|---|---|
int |
getRunnableInstances(String runnableName)
Returns the number of runnable instances. |
URL |
getServiceURL()
Used to discover the Service managed by this ServiceManager. |
URL |
getServiceURL(long timeout,
TimeUnit timeoutUnit)
Used to discover the Service managed by this ServiceManager which allows a custom timeout value to wait for the service to be available. |
boolean |
isRunning()
Checks if Service is Running |
void |
setRunnableInstances(String runnable,
int instances)
Changes the number of runnable instances. |
void |
stop()
Stops the running service. |
| Method Detail |
|---|
void setRunnableInstances(String runnable,
int instances)
runnable - Name of the runnable (can be either handler or worker).instances - Number of instances to change to.int getRunnableInstances(String runnableName)
runnableName - Name of the runnable (can be either handler or worker).void stop()
boolean isRunning()
URL getServiceURL()
null if the service is not available
URL getServiceURL(long timeout,
TimeUnit timeoutUnit)
timeout - how long to wait before giving up, in unit of timeoutUnittimeoutUnit - a TimeUnit to interpret the value of timeout
null if the service is not available
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||