Class VertxWebsocketHost
java.lang.Object
org.apache.camel.component.vertx.websocket.VertxWebsocketHost
A Vert.x backed WebSocket host bound to a specified host invalid input: '&' port
-
Constructor Summary
ConstructorsConstructorDescriptionVertxWebsocketHost
(org.apache.camel.CamelContext camelContext, VertxWebsocketHostConfiguration websocketHostConfiguration, VertxWebsocketHostKey key) -
Method Summary
Modifier and TypeMethodDescriptionvoid
connect
(VertxWebsocketConsumer consumer) Sets up a Vert.x route and handler for the WebSocket path specified by the consumer configurationvoid
disconnect
(String path) Removes the Vert.x route and handler for the WebSocket path specified by the consumer configurationgetConnectedPeer
(String connectionKey) Gets a connected peer for the given connection keyGets all WebSocket peers connected to the Vert.x HTTP sever together with their associated connection keyint
getPort()
Gets the port that the server is bound to.boolean
isManagedHost
(String host) Determines whether the specified host name is one that is managed by this host.boolean
isManagedPort
(int port) Determines whether the specified port is one that is managed by this host.void
start()
Starts a Vert.x HTTP server to host the WebSocket routervoid
stop()
Stops a previously started Vert.x HTTP server
-
Constructor Details
-
VertxWebsocketHost
public VertxWebsocketHost(org.apache.camel.CamelContext camelContext, VertxWebsocketHostConfiguration websocketHostConfiguration, VertxWebsocketHostKey key)
-
-
Method Details
-
connect
Sets up a Vert.x route and handler for the WebSocket path specified by the consumer configuration -
disconnect
Removes the Vert.x route and handler for the WebSocket path specified by the consumer configuration -
start
Starts a Vert.x HTTP server to host the WebSocket router- Throws:
Exception
-
stop
Stops a previously started Vert.x HTTP server -
getConnectedPeers
Gets all WebSocket peers connected to the Vert.x HTTP sever together with their associated connection key -
getConnectedPeer
Gets a connected peer for the given connection key -
getPort
public int getPort()Gets the port that the server is bound to. This could be a random value if 0 was specified as the initial port number -
isManagedHost
Determines whether the specified host name is one that is managed by this host. -
isManagedPort
public boolean isManagedPort(int port) Determines whether the specified port is one that is managed by this host.
-