@UriEndpoint(scheme="websocket", title="Jetty Websocket", syntax="websocket:host:port/resourceUri", consumerClass=WebsocketConsumer.class, label="websocket") public class WebsocketEndpoint extends DefaultEndpoint
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
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) |
Consumer |
createConsumer(Processor processor)
Creates a new Event
Driven Consumer which consumes messages from the endpoint using the
given processor
|
Producer |
createProducer()
Creates a new producer which is used send messages into the endpoint
|
void |
disconnect(WebsocketConsumer consumer) |
void |
disconnect(WebsocketProducer producer) |
String |
getAllowedOrigins() |
Integer |
getBufferSize() |
WebsocketComponent |
getComponent()
Returns the component that created this endpoint.
|
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() |
SSLContextParameters |
getSslContextParameters() |
String |
getStaticResources() |
URI |
getUri() |
boolean |
isCrossOriginFilterOn() |
boolean |
isEnableJmx() |
boolean |
isSessionSupport() |
boolean |
isSingleton()
Whether this class supports being singleton or not.
|
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(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()
DefaultEndpoint
getComponent
in class DefaultEndpoint
public Consumer createConsumer(Processor processor) throws Exception
Endpoint
processor
- the given processorException
- can be thrownpublic Producer createProducer() throws Exception
Endpoint
Exception
- can be thrownpublic 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()
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 SSLContextParameters getSslContextParameters()
public void setSslContextParameters(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)
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.