public function findHandlerMethod(AbstractAnnotatedSaga $target, EventMessageInterface $event) { foreach ($this->getMessageHandlers($event) as $handler) { $associationValue = $handler->getAssociationValue($event); if ($target->getAssociationValues()->contains($associationValue)) { return $handler; } } return SagaMethodMessageHandler::noHandlers(); /* for (SagaMethodMessageHandler handler : getMessageHandlers(event)) { final AssociationValue associationValue = handler.getAssociationValue(event); if (target.getAssociationValues().contains(associationValue)) { return handler; } else if (logger.isDebugEnabled()) { logger.debug( "Skipping handler [{}], it requires an association value [{}:{}] that this Saga is not associated with", handler.getName(), associationValue.getKey(), associationValue.getValue()); } } if (logger.isDebugEnabled()) { logger.debug("No suitable handler was found for event of type", event.getPayloadType().getName()); } return SagaMethodMessageHandler.noHandler(); */ }
public function end() { parent::end(); }
public function __construct($identifier) { parent::__construct($identifier); }
public function removeAssociationWith(\Governor\Framework\Saga\AssociationValue $associationValue) { parent::removeAssociationWith($associationValue); }
public function removeAssociationWith(AssociationValue $associationValue) { parent::removeAssociationWith($associationValue); }