Package org.copperengine.core.tranzient
Interface EarlyResponseContainer
-
- All Known Implementing Classes:
DefaultEarlyResponseContainer
public interface EarlyResponseContainer
A transient container for early response. In the context of COPPER, a reponse is called early, if an asynchronous response is provided to an engine usingnotify
before the workflow has calledwait
. In this case the engine is unable to correlate the response with a waiting workflow instance and will store the response in this container. Later on, the engine will ask the container for everywait
if a response for this wait is already there. In this case the response is removed from the container. The container may implement a strategy to remove reponses for which no wait from a corresponding workflow instance is called.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<Response<?>>
get(java.lang.String correlationId)
Gets and removes the responses for the provided correlationId if they exists.void
put(Response<?> response)
Puts an early reponse into the containervoid
shutdown()
Shutdown the containervoid
startup()
Startup the container
-
-
-
Method Detail
-
put
void put(Response<?> response)
Puts an early reponse into the container- Parameters:
response
- the response to be put into the container
-
get
java.util.List<Response<?>> get(java.lang.String correlationId)
Gets and removes the responses for the provided correlationId if they exists.- Parameters:
correlationId
- correlationId for which responses shall be get and removed.- Returns:
- the responses or an empty list if there is no response for the provided correlationId.
-
startup
void startup()
Startup the container
-
shutdown
void shutdown()
Shutdown the container
-
-