/**
  * @param MessageHandlerWasInstalled $event
  */
 public function onMessageHandlerWasInstalled(MessageHandlerWasInstalled $event)
 {
     $processingTypes = $event->supportedProcessingTypes()->toArray();
     $this->connection->insert(Tables::MESSAGE_HANDLER, ['id' => $event->messageHandlerId()->toString(), 'name' => $event->messageHandlerName(), 'node_name' => $event->processingNodeName()->toString(), 'type' => $event->handlerType()->toString(), 'data_direction' => $event->dataDirection()->toString(), 'processing_types' => $processingTypes['support_all'] ? ProcessingTypes::SUPPORT_ALL : implode(',', $processingTypes['processing_types']), 'processing_metadata' => json_encode($event->processingMetadata()->toArray()), 'metadata_riot_tag' => $event->metadataRiotTag(), 'icon' => $event->icon(), 'icon_type' => $event->iconType(), 'preferred_type' => !is_null($event->preferredProcessingType()) ? $event->preferredProcessingType()->of() : null, 'processing_id' => !is_null($event->processingId()) ? $event->processingId()->toString() : null, 'additional_data' => json_encode($event->additionalData())]);
 }
 /**
  * @param MessageHandlerWasInstalled $event
  */
 protected function whenMessageHandlerWasInstalled(MessageHandlerWasInstalled $event)
 {
     $this->messageHandlerId = $event->messageHandlerId();
     $this->name = $event->messageHandlerName();
     $this->processingNodeName = $event->processingNodeName();
     $this->handlerType = $event->handlerType();
     $this->dataDirection = $event->dataDirection();
     $this->supportedProcessingTypes = $event->supportedProcessingTypes();
     $this->preferredProcessingType = $event->preferredProcessingType();
     $this->processingMetadata = $event->processingMetadata();
     $this->metadataRiotTag = $event->metadataRiotTag();
     $this->icon = $event->icon();
     $this->iconType = $event->iconType();
     $this->processingId = $event->processingId();
     $this->additionalData = $event->additionalData();
 }