public interface ServiceLifecycle extends Extension
ServiceLifecycle
defines a lifecycle interface for a OMS related service endpoint, like Producer
,
Consumer
, and so on.
If the service endpoint class implements the ServiceLifecycle
interface, most of the containers can manage
the lifecycle of the corresponding service endpoint objects easily.
Any service endpoint should support repeated restart if it implements the ServiceLifecycle
interface.
Modifier and Type | Method and Description |
---|---|
ServiceLifeState |
currentState()
Used for get service current state, for execution of some operations is dependent on the current service state.
|
void |
start()
Used for startup or initialization of a service endpoint.
|
void |
stop()
Notify a service instance of the end of its life cycle.
|
getQueueMetaData
void start()
void stop()
ServiceLifeState currentState()
ServiceLifeState
Copyright © 2017–2020 OpenMessaging. All rights reserved.