Class WebsocketEndpointBuilderFactory.WebsocketHeaderNameBuilder
- java.lang.Object
-
- org.apache.camel.builder.endpoint.dsl.WebsocketEndpointBuilderFactory.WebsocketHeaderNameBuilder
-
- Enclosing interface:
- WebsocketEndpointBuilderFactory
public static class WebsocketEndpointBuilderFactory.WebsocketHeaderNameBuilder extends Object
The builder of headers' name for the Jetty Websocket component.
-
-
Constructor Summary
Constructors Constructor Description WebsocketHeaderNameBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
websocketConnectionkey()
Producer: Sends the message to all clients which are currently connected.String
websocketRelativepath()
If you specify a wildcard URI path for an endpoint, and a websocket client connects to that websocket endpoing, the relative path that the client specified will be provided in this header.String
websocketRemoteaddress()
Remote address of the websocket session.String
websocketSendtoall()
Sends the message to all clients which are currently connected.String
websocketSubprotocol()
If a specific subprotocol was negotiated, it will be specfied in this header.
-
-
-
Method Detail
-
websocketConnectionkey
public String websocketConnectionkey()
Producer: Sends the message to all clients which are currently connected. You can use the sendToAll option on the endpoint instead of using this header. Consumer: Connection key identifying an individual client connection. You can save this and specify it again when routing to a producer endpoing in order to direct messages to a specific connected client. The option is a:String
type. Group: common- Returns:
- the name of the header
websocket.connectionKey
.
-
websocketSendtoall
public String websocketSendtoall()
Sends the message to all clients which are currently connected. You can use the sendToAll option on the endpoint instead of using this header. The option is a:Boolean
type. Group: producer- Returns:
- the name of the header
websocket.sendToAll
.
-
websocketRemoteaddress
public String websocketRemoteaddress()
Remote address of the websocket session. The option is a:java.net.InetSocketAddress
type. Group: consumer- Returns:
- the name of the header
websocket.remoteAddress
.
-
websocketSubprotocol
public String websocketSubprotocol()
If a specific subprotocol was negotiated, it will be specfied in this header. Note that if you specify the any subprotocol to be supported, and a client requests a specific subprotocol, the connection will be accepted without a specific subprotocol being used. You need to specifically support a given protocol by name if you want it returned to the client and to show up in the message header. The option is a:String
type. Group: consumer- Returns:
- the name of the header
websocket.subprotocol
.
-
websocketRelativepath
public String websocketRelativepath()
If you specify a wildcard URI path for an endpoint, and a websocket client connects to that websocket endpoing, the relative path that the client specified will be provided in this header. For example, if you specified websocket://0.0.0.0:80/api/ as your endpoint URI, and a client connects to the server at ws://host.com/api/specialized/apipath then specialized/apipath is provided in the relative path header of all messages from that client. The option is a:String
type. Group: consumer- Returns:
- the name of the header
websocket.relativePath
.
-
-