|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CorrelatorDAO
Data access object representing a correlator. A correlator does not have a simple explanation: it acts as match-maker connecting messages with message consumers (i.e. BPEL pick and receive operations) across time. For each partnerLink "myRole" and operation there is one correlator.
The correlator functions as a two-sided queue: when a message is received the correlator is used to dequeue a consumer based on the keys from the message. If no consumer matches the keys in the message, the message itself is enqueued along with its keys. Conversely, when a BPEL pick/receive operation is performed, the correlator is used to dequeue a message matching a given correlation key. If no message is found, the consumer (i.e. the pick/receive operation) is enqueued along with the target key.
The end result is matching of messages to pick/receive operations, irrespective of whether the operation or the message arrives first. Make sense?
Method Summary | |
---|---|
void |
addRoute(java.lang.String routeGroupId,
ProcessInstanceDAO target,
int index,
CorrelationKeySet correlationKeySet,
java.lang.String routePolicy)
Add a route from the given correlation key to the given process instance. |
MessageExchangeDAO |
dequeueMessage(CorrelationKeySet correlationKeySet)
Dequeue a message exchange matching a correlationKey constraint. |
void |
enqueueMessage(MessageExchangeDAO mex,
CorrelationKeySet correlationKeySet)
Enqueue a message exchange to the queue with a set of correlation keys. |
java.util.List<MessageRouteDAO> |
findRoute(CorrelationKeySet correlationKeySet)
Find a route matching the given correlation key. |
java.util.Collection<CorrelatorMessageDAO> |
getAllMessages()
|
java.util.Collection<MessageRouteDAO> |
getAllRoutes()
|
java.lang.String |
getCorrelatorId()
Get the correlator identifier. |
void |
removeRoutes(java.lang.String routeGroupId,
ProcessInstanceDAO target)
Remove all routes with the given route-group identifier. |
void |
setCorrelatorId(java.lang.String newId)
|
Method Detail |
---|
java.lang.String getCorrelatorId()
void setCorrelatorId(java.lang.String newId)
void enqueueMessage(MessageExchangeDAO mex, CorrelationKeySet correlationKeySet)
mex
- message exchangecorrelationKeys
- pre-computed set of correlation keys for this messageMessageExchangeDAO dequeueMessage(CorrelationKeySet correlationKeySet)
correlationKey
- correlation correlationKey constraint
java.util.Collection<CorrelatorMessageDAO> getAllMessages()
java.util.List<MessageRouteDAO> findRoute(CorrelationKeySet correlationKeySet)
correlationKey
- correlation key
void addRoute(java.lang.String routeGroupId, ProcessInstanceDAO target, int index, CorrelationKeySet correlationKeySet, java.lang.String routePolicy)
routeGroupId
- identifier of the group of routes to which this route belongstarget
- target process instanceindex
- relative order in which the route should be consideredcorrelationKey
- correlation key to matchvoid removeRoutes(java.lang.String routeGroupId, ProcessInstanceDAO target)
routeGroupId
- java.util.Collection<MessageRouteDAO> getAllRoutes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |