コード例 #1
0
 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(); */
 }
コード例 #2
0
ファイル: StubSaga.php プロジェクト: fcm/GovernorFramework
 public function end()
 {
     parent::end();
 }
コード例 #3
0
 public function __construct($identifier)
 {
     parent::__construct($identifier);
 }
コード例 #4
0
 public function removeAssociationWith(\Governor\Framework\Saga\AssociationValue $associationValue)
 {
     parent::removeAssociationWith($associationValue);
 }
コード例 #5
0
 public function removeAssociationWith(AssociationValue $associationValue)
 {
     parent::removeAssociationWith($associationValue);
 }