org.smartcomps.twister.engine.priv.messaging.impl
Class MessageControllerImpl

java.lang.Object
  |
  +--org.smartcomps.twister.engine.priv.messaging.impl.MessageControllerImpl
All Implemented Interfaces:
MessageController

public class MessageControllerImpl
extends java.lang.Object
implements MessageController

Implementation of the MessageController interface.

See Also:
TODO test all cases

Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
MessageControllerImpl()
           
 
Method Summary
 org.smartcomps.twister.engine.priv.core.dynamic.ReceiveEC acknowledge(java.lang.String partnerLink, java.lang.String portType, java.lang.String operation, org.dom4j.Document message)
          As the acknowledge method requires a partner link it's always targeted at only one process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
Constructor Detail

MessageControllerImpl

public MessageControllerImpl()
Method Detail

acknowledge

public org.smartcomps.twister.engine.priv.core.dynamic.ReceiveEC acknowledge(java.lang.String partnerLink,
                                                                             java.lang.String portType,
                                                                             java.lang.String operation,
                                                                             org.dom4j.Document message)
                                                                      throws CorrelationViolationException,
                                                                             ConflictingReceiveException
As the acknowledge method requires a partner link it's always targeted at only one process. If a process includes several receives with createInstance, they must have same correlation. 1. Checking all receives and selecting their correlations 2. For each receive, finding their ec from correlation and instance. 3. If several ecs are found, send conflicting receive failure. Done. 4. If one ec is found, sending it the message. Done. 5. If no ecs are found : 5.1. If one receive is a createInstance, executing it. Done. 5.2. If several receives have createInstance and no instance exists, execute first one. Done. 5.3. If several receives have createInstance and instance exists, creating ec for one of the receives with no ec in instance and executing it. Done. Picks are processed exactly as receives using wrappers.

Specified by:
acknowledge in interface MessageController
Parameters:
partnerLink -
portType -
operation -
message -
Returns:
Document reply to the message (everything fine or error)
CorrelationViolationException
ConflictingReceiveException


Copyright © 2003 SmartComps. All Rights Reserved.