Class ConnectWebSocket

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processors.websocket.AbstractWebSocketGatewayProcessor
org.apache.nifi.processors.websocket.ConnectWebSocket
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.processor.Processor, BinaryMessageConsumer, ConnectedListener, TextMessageConsumer

@Tags({"subscribe","WebSocket","consume","listen"}) @InputRequirement(INPUT_ALLOWED) @TriggerSerially @CapabilityDescription("Acts as a WebSocket client endpoint to interact with a remote WebSocket server. FlowFiles are transferred to downstream relationships according to received message types as WebSocket client configured with this processor receives messages from remote WebSocket server. If a new flowfile is passed to the processor, the previous sessions will be closed and any data being sent will be aborted.") @WritesAttribute(attribute="websocket.controller.service.id",description="WebSocket Controller Service id.") @WritesAttribute(attribute="websocket.session.id",description="Established WebSocket session id.") @WritesAttribute(attribute="websocket.endpoint.id",description="WebSocket endpoint id.") @WritesAttribute(attribute="websocket.local.address",description="WebSocket client address.") @WritesAttribute(attribute="websocket.remote.address",description="WebSocket server address.") @WritesAttribute(attribute="websocket.message.type",description="TEXT or BINARY.") public class ConnectWebSocket extends AbstractWebSocketGatewayProcessor
  • Field Details

    • PROP_WEBSOCKET_CLIENT_SERVICE

      public static final org.apache.nifi.components.PropertyDescriptor PROP_WEBSOCKET_CLIENT_SERVICE
    • PROP_WEBSOCKET_CLIENT_ID

      public static final org.apache.nifi.components.PropertyDescriptor PROP_WEBSOCKET_CLIENT_ID
    • PROPERTY_DESCRIPTORS

      private static final List<org.apache.nifi.components.PropertyDescriptor> PROPERTY_DESCRIPTORS
    • RELATIONSHIPS

      private static final Set<org.apache.nifi.processor.Relationship> RELATIONSHIPS
  • Constructor Details

    • ConnectWebSocket

      public ConnectWebSocket()
  • Method Details

    • getRelationships

      public Set<org.apache.nifi.processor.Relationship> getRelationships()
      Specified by:
      getRelationships in interface org.apache.nifi.processor.Processor
      Overrides:
      getRelationships in class org.apache.nifi.processor.AbstractSessionFactoryProcessor
    • getSupportedPropertyDescriptors

      public final List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class org.apache.nifi.components.AbstractConfigurableComponent
    • getWebSocketService

      protected WebSocketService getWebSocketService(org.apache.nifi.processor.ProcessContext context)
      Specified by:
      getWebSocketService in class AbstractWebSocketGatewayProcessor
    • getEndpointId

      protected String getEndpointId(org.apache.nifi.processor.ProcessContext context)
      Specified by:
      getEndpointId in class AbstractWebSocketGatewayProcessor
    • getTransitUri

      protected String getTransitUri(WebSocketSessionInfo sessionInfo)
      Specified by:
      getTransitUri in class AbstractWebSocketGatewayProcessor