Interface Service
-
public interface Service
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
dispatch(MessageContext msgCtx)
This has the responsibility of dispatching the fetched message from the message store to the client.MessageContext
fetch(MessageConsumer msgConsumer)
This method has the responsibility of fetching message from the message store.boolean
init(org.quartz.JobExecutionContext jobExecutionContext)
This method is used to initialize a service.boolean
terminate()
This method terminates a running service immediately.
-
-
-
Method Detail
-
init
boolean init(org.quartz.JobExecutionContext jobExecutionContext)
This method is used to initialize a service. Each time it fires this method get called. This ensures all the configurations of the service is up to date.- Parameters:
jobExecutionContext
- is the execution environment of the message processors- Returns:
- true if the message processor is successfully initialized
-
fetch
MessageContext fetch(MessageConsumer msgConsumer)
This method has the responsibility of fetching message from the message store.- Parameters:
msgConsumer
- is the associated message consumer of the message processor.- Returns:
- response message upon successful execution
-
dispatch
boolean dispatch(MessageContext msgCtx)
This has the responsibility of dispatching the fetched message from the message store to the client. Scenarios such as connection failures between client and service are handled by this method.- Parameters:
msgCtx
- is returned value of the fetch method.- Returns:
- true upon successful execution
-
terminate
boolean terminate()
This method terminates a running service immediately. Whatever state that of the service will not be saved and it will be lost.- Returns:
- true upon successful execution
-
-