|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ServiceInstance
).
Represents the service state manager in the WSO2 SOA Enablement Server runtime. It is used by the administrator tools to display and manage the state of service instances, and by the deployment mechanism during the uninstallation process.
Method Summary | |
void |
disable(java.lang.String serviceName)
Deprecated. Performs transition to the ServiceInstance.Disabled
service state. |
void |
enable(java.lang.String serviceName)
Deprecated. Performs transition from the ServiceInstance.Disabled
state to ServiceInstance.Offline state, thus allowing
the service to process requests. |
ServiceState |
getServiceState(java.lang.String serviceName)
Deprecated. Returns service state for service instance with given name. |
void |
kill(java.lang.String serviceName)
Deprecated. Forces service instance to go to Stopped without waiting
for the active request to complete. |
void |
start(java.lang.String serviceName)
Deprecated. Starts the service, moving it to the Enabled state. |
void |
stop(java.lang.String serviceName)
Deprecated. Performs transition to the ServiceInstance.Stopped
service state, thus preventing service to receive requests, but
will not remove service from memory. |
void |
waitForState(java.lang.String serviceName,
ServiceState state,
long timeout)
Deprecated. Waits for the service instance to enter given state. |
Method Detail |
public ServiceState getServiceState(java.lang.String serviceName) throws ServiceInstanceNotFoundException
serviceName
- name of the service instance for which the state has
to be returned
ServiceInstanceNotFoundException
public void disable(java.lang.String serviceName) throws ServiceInstanceNotFoundException, InvalidStateTransitionException
ServiceInstance.Disabled
service state. For more information see documentation about service
states and their transition diagram.
This method is not legal for service instance in Disabled state.
serviceName
- name of the service instance
ServiceInstanceNotFoundException
InvalidStateTransitionException
public void enable(java.lang.String serviceName) throws ServiceInstanceNotFoundException, InvalidStateTransitionException
ServiceInstance.Disabled
state to ServiceInstance.Offline
state, thus allowing
the service to process requests.
This method is legal only for services in the Disabled state.
serviceName
- name of the service instance
ServiceInstanceNotFoundException
InvalidStateTransitionException
public void stop(java.lang.String serviceName) throws ServiceInstanceNotFoundException, InvalidStateTransitionException
ServiceInstance.Stopped
service state, thus preventing service to receive requests, but
will not remove service from memory.
If the service instance is in the Active
state, transition is
done via the Stopping
state as described in the
service states documentation.
serviceName
- name of the service instance
ServiceInstanceNotFoundException
InvalidStateTransitionException
public void kill(java.lang.String serviceName) throws ServiceInstanceNotFoundException, InvalidStateTransitionException
Stopped
without waiting
for the active request to complete. The active connections are abandoned.
This method is legal only for service instance in the Enabled, Offline,
Active
and Stopping
states.
Note: use with care - this method is unsafe and does not terminate active connections properly. It can thus lead to unpredictable behavior.
serviceName
- name of the service instance
ServiceInstanceNotFoundException
InvalidStateTransitionException
public void start(java.lang.String serviceName) throws ServiceInstanceNotFoundException, InvalidStateTransitionException
Enabled
state.
This method is legal for services in Stopped
state only.
serviceName
- name of the service instance
ServiceInstanceNotFoundException
InvalidStateTransitionException
public void waitForState(java.lang.String serviceName, ServiceState state, long timeout) throws ServiceInstanceNotFoundException, TimeoutExpiredException, java.lang.InterruptedException
This method returns when the service instance enters a given state or when the
given timeout expires. The user can set
timeout = -1
to wait without timeout.
serviceName
- name of the service instancestate
- the service state to wait fortimeout
- upper bound of time in milliseconds to wait for
service instance to enter required state. Set to
-1
to wait without timeout.
TimeoutExpiredException
- when timeout interval expires without
the service instance entering given state
ServiceInstanceNotFoundException
java.lang.InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |