Class VertxWebsocketHost
java.lang.Object
org.apache.camel.component.vertx.websocket.VertxWebsocketHost
A Vert.x backed WebSocket host bound to a specified host & port
-
Constructor Summary
ConstructorsConstructorDescriptionVertxWebsocketHost(org.apache.camel.CamelContext camelContext, VertxWebsocketHostConfiguration websocketHostConfiguration, VertxWebsocketHostKey key) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(VertxWebsocketConsumer consumer) Sets up a Vert.x route and handler for the WebSocket path specified by the consumer configurationvoiddisconnect(String path) Removes the Vert.x route and handler for the WebSocket path specified by the consumer configurationGets all WebSocket peers connected to the Vert.x HTTP sever together with their associated connection keyintgetPort()Gets the port that the server is bound to.voidstart()Starts a Vert.x HTTP server to host the WebSocket routervoidstop()Starts 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
Starts 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 -
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
-