@UriEndpoint(scheme="websocket", title="Jetty Websocket", syntax="websocket:host:port/resourceUri", consumerClass=WebsocketConsumer.class, label="websocket") public class WebsocketEndpoint extends org.apache.camel.impl.DefaultEndpoint
Constructor and Description |
---|
WebsocketEndpoint(WebsocketComponent component,
String uri,
String resourceUri,
Map<String,Object> parameters) |
Modifier and Type | Method and Description |
---|---|
void |
connect(WebsocketConsumer consumer) |
void |
connect(WebsocketProducer producer) |
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Producer |
createProducer() |
void |
disconnect(WebsocketConsumer consumer) |
void |
disconnect(WebsocketProducer producer) |
String |
getAllowedOrigins() |
Integer |
getBufferSize() |
WebsocketComponent |
getComponent() |
String |
getFilterPath() |
List<org.eclipse.jetty.server.Handler> |
getHandlers() |
String |
getHost() |
Integer |
getMaxBinaryMessageSize() |
Integer |
getMaxIdleTime() |
Integer |
getMaxTextMessageSize() |
Integer |
getMinVersion() |
String |
getPath() |
Integer |
getPort() |
String |
getProtocol() |
String |
getResourceUri() |
Boolean |
getSendToAll() |
org.apache.camel.util.jsse.SSLContextParameters |
getSslContextParameters() |
String |
getStaticResources() |
URI |
getUri() |
boolean |
isCrossOriginFilterOn() |
boolean |
isEnableJmx() |
boolean |
isSessionSupport() |
boolean |
isSingleton() |
void |
setAllowedOrigins(String allowedOrigins)
The CORS allowed origins.
|
void |
setBufferSize(Integer bufferSize)
Set the buffer size of the websocketServlet, which is also the max frame byte size (default 8192)
|
void |
setCrossOriginFilterOn(boolean crossOriginFilterOn)
Whether to enable CORS
|
void |
setEnableJmx(boolean enableJmx)
If this option is true, Jetty JMX support will be enabled for this endpoint.
|
void |
setFilterPath(String filterPath)
Context path for filtering CORS
|
void |
setHandlers(List<org.eclipse.jetty.server.Handler> handlers) |
void |
setHost(String host)
The hostname.
|
void |
setMaxBinaryMessageSize(Integer maxBinaryMessageSize)
Can be used to set the size in bytes that the websocket created by the websocketServlet may be accept before closing.
|
void |
setMaxIdleTime(Integer maxIdleTime)
Set the time in ms that the websocket created by the websocketServlet may be idle before closing.
|
void |
setMaxTextMessageSize(Integer maxTextMessageSize)
Can be used to set the size in characters that the websocket created by the websocketServlet may be accept before closing.
|
void |
setMinVersion(Integer minVersion)
Can be used to set the minimum protocol version accepted for the websocketServlet.
|
void |
setPort(int port)
The port number.
|
void |
setResourceUri(String resourceUri)
Name of the websocket channel to use
|
void |
setSendToAll(Boolean sendToAll)
To send to all websocket subscribers.
|
void |
setSessionSupport(boolean support)
Whether to enable session support which enables HttpSession for each http request.
|
void |
setSslContextParameters(org.apache.camel.util.jsse.SSLContextParameters sslContextParameters)
To configure security using SSLContextParameters
|
void |
setStaticResources(String staticResources)
Set a resource path for static resources (such as .html files etc).
|
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public WebsocketComponent getComponent()
getComponent
in class org.apache.camel.impl.DefaultEndpoint
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
Exception
public void connect(WebsocketConsumer consumer) throws Exception
Exception
public void disconnect(WebsocketConsumer consumer) throws Exception
Exception
public void connect(WebsocketProducer producer) throws Exception
Exception
public void disconnect(WebsocketProducer producer) throws Exception
Exception
public boolean isSingleton()
public URI getUri()
public Integer getPort()
public String getHost()
public void setHost(String host)
public void setPort(int port)
public String getStaticResources()
public void setStaticResources(String staticResources)
public Boolean getSendToAll()
public void setSendToAll(Boolean sendToAll)
public String getProtocol()
public String getPath()
public void setSessionSupport(boolean support)
public boolean isSessionSupport()
public Integer getBufferSize()
public void setBufferSize(Integer bufferSize)
public Integer getMaxIdleTime()
public void setMaxIdleTime(Integer maxIdleTime)
public Integer getMaxTextMessageSize()
public void setMaxTextMessageSize(Integer maxTextMessageSize)
public Integer getMaxBinaryMessageSize()
public void setMaxBinaryMessageSize(Integer maxBinaryMessageSize)
public Integer getMinVersion()
public void setMinVersion(Integer minVersion)
public List<org.eclipse.jetty.server.Handler> getHandlers()
public void setHandlers(List<org.eclipse.jetty.server.Handler> handlers)
public org.apache.camel.util.jsse.SSLContextParameters getSslContextParameters()
public void setSslContextParameters(org.apache.camel.util.jsse.SSLContextParameters sslContextParameters)
public boolean isEnableJmx()
public void setEnableJmx(boolean enableJmx)
public String getAllowedOrigins()
public void setAllowedOrigins(String allowedOrigins)
public boolean isCrossOriginFilterOn()
public void setCrossOriginFilterOn(boolean crossOriginFilterOn)
public String getFilterPath()
public void setFilterPath(String filterPath)
public String getResourceUri()
public void setResourceUri(String resourceUri)
Apache Camel