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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.nifi.processors.websocket.AbstractWebSocketGatewayProcessor
AbstractWebSocketGatewayProcessor.WebSocketFunction -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate static final List<org.apache.nifi.components.PropertyDescriptor> private static final Set<org.apache.nifi.processor.Relationship> Fields inherited from class org.apache.nifi.processors.websocket.AbstractWebSocketGatewayProcessor
endpointId, logger, processSessionFactory, REL_CONNECTED, REL_DISCONNECTED, REL_FAILURE, REL_MESSAGE_BINARY, REL_MESSAGE_TEXT, REL_SUCCESS, webSocketService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetEndpointId(org.apache.nifi.processor.ProcessContext context) Set<org.apache.nifi.processor.Relationship> final List<org.apache.nifi.components.PropertyDescriptor> protected StringgetTransitUri(WebSocketSessionInfo sessionInfo) protected WebSocketServicegetWebSocketService(org.apache.nifi.processor.ProcessContext context) Methods inherited from class org.apache.nifi.processors.websocket.AbstractWebSocketGatewayProcessor
connected, consume, consume, disconnected, getAbstractRelationships, init, isProcessorRegisteredToService, onStopped, onTrigger, onWebSocketServiceReady, registerProcessorToServiceMethods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.processor.Processor
isStateful, migrateProperties, migrateRelationships
-
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
-
RELATIONSHIPS
-
-
Constructor Details
-
ConnectWebSocket
public ConnectWebSocket()
-
-
Method Details
-
getRelationships
- Specified by:
getRelationshipsin interfaceorg.apache.nifi.processor.Processor- Overrides:
getRelationshipsin classorg.apache.nifi.processor.AbstractSessionFactoryProcessor
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
getWebSocketService
- Specified by:
getWebSocketServicein classAbstractWebSocketGatewayProcessor
-
getEndpointId
- Specified by:
getEndpointIdin classAbstractWebSocketGatewayProcessor
-
getTransitUri
- Specified by:
getTransitUriin classAbstractWebSocketGatewayProcessor
-