Esempio n. 1
0
 /**
  * @param string               $eventFqcn
  * @param SubscribeOptions     $options
  * @param PipelineStageContext $parentContext
  */
 public function __construct($eventFqcn, SubscribeOptions $options, PipelineStageContext $parentContext)
 {
     Guard::againstNullAndEmpty('eventFqcn', $eventFqcn);
     parent::__construct($parentContext);
     $this->eventFqcn = $eventFqcn;
     $this->subscribeOptions = $options;
 }
 /**
  * @param string                   $incomingMessageId
  * @param IncomingPhysicalMessage  $incomingMessage
  * @param ReceiveCancellationToken $cancellationToken
  * @param EndpointControlToken     $endpointControlToken
  * @param PipelineStageContext     $parent
  */
 public function __construct($incomingMessageId, IncomingPhysicalMessage $incomingMessage, ReceiveCancellationToken $cancellationToken, EndpointControlToken $endpointControlToken, PipelineStageContext $parent)
 {
     parent::__construct($parent);
     $this->messageId = $incomingMessageId;
     $this->message = $incomingMessage;
     $this->cancellationToken = $cancellationToken;
     $this->endpointControlToken = $endpointControlToken;
 }
Esempio n. 3
0
 /**
  * DispatchContext constructor.
  *
  * @param TransportOperation[] $transportOperations
  * @param PipelineStageContext $parentContext
  */
 public function __construct(array $transportOperations, PipelineStageContext $parentContext)
 {
     parent::__construct($parentContext);
     foreach ($transportOperations as $transportOperation) {
         if (!$transportOperation instanceof TransportOperation) {
             throw new InvalidArgumentException("Argument 1 should be an array of 'PSB\\Core\\Transport\\TransportOperation'.");
         }
     }
     $this->transportOperations = $transportOperations;
 }
Esempio n. 4
0
 /**
  * @param string                     $messageId
  * @param array                      $headers
  * @param IncomingPhysicalMessage    $incomingPhysicalMessage
  * @param PendingTransportOperations $pendingTransportOperations
  * @param BusOperations              $busOperations
  * @param OutgoingOptionsFactory     $outgoingOptionsFactory
  * @param EndpointControlToken       $endpointControlToken
  * @param PipelineStageContext       $parentContext
  */
 public function __construct($messageId, array $headers, IncomingPhysicalMessage $incomingPhysicalMessage, PendingTransportOperations $pendingTransportOperations, BusOperations $busOperations, OutgoingOptionsFactory $outgoingOptionsFactory, EndpointControlToken $endpointControlToken, PipelineStageContext $parentContext)
 {
     parent::__construct($parentContext);
     $this->messageId = $messageId;
     $this->headers = $headers;
     $this->incomingPhysicalMessage = $incomingPhysicalMessage;
     $this->pendingTransportOperations = $pendingTransportOperations;
     $this->busOperations = $busOperations;
     $this->outgoingOptionsFactory = $outgoingOptionsFactory;
     $this->endpointControlToken = $endpointControlToken;
 }
Esempio n. 5
0
 /**
  * OutgoingContext constructor.
  *
  * @param string               $messageId
  * @param array                $headers
  * @param PipelineStageContext $parentContext
  */
 public function __construct($messageId, array $headers, PipelineStageContext $parentContext)
 {
     parent::__construct($parentContext);
     $this->messageId = $messageId;
     $this->headers = $headers;
 }
 public function __construct(BuilderInterface $builder)
 {
     parent::__construct(null);
     $this->set(BuilderInterface::class, $builder);
 }
 /**
  * @param object               $message
  * @param SendOptions          $options
  * @param PipelineStageContext $parentContext
  *
  * @return OutgoingSendContext
  */
 public function createSendContext($message, SendOptions $options, PipelineStageContext $parentContext)
 {
     return new OutgoingSendContext(new OutgoingLogicalMessage($message), $options, $parentContext instanceof IncomingContext ? $parentContext->getIncomingPhysicalMessage() : null, $parentContext instanceof IncomingContext ? $parentContext->getPendingTransportOperations() : null, $parentContext);
 }