public class WebSocketSettings extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WebSocketSettings.Holder
Holds this WebSocketSettings in the Application's metadata.
|
static class |
WebSocketSettings.SameThreadExecutor
Simple executor that runs the tasks in the caller thread.
|
| Constructor and Description |
|---|
WebSocketSettings() |
| Modifier and Type | Method and Description |
|---|---|
CharSequence |
getBaseUrl() |
IWebSocketConnectionFilter |
getConnectionFilter() |
IWebSocketConnectionRegistry |
getConnectionRegistry() |
CharSequence |
getContextPath() |
CharSequence |
getFilterPrefix() |
Executor |
getSendPayloadExecutor()
The executor that broadcasts the
WebSocketPayload
via Wicket's event bus. |
Executor |
getWebSocketPushMessageExecutor() |
org.apache.wicket.request.http.WebRequest |
newWebSocketRequest(javax.servlet.http.HttpServletRequest request,
String filterPath)
A factory method for the
WebRequest
that should be used in the WebSocket processing request cycle |
WebSocketRequestHandler |
newWebSocketRequestHandler(Page page,
IWebSocketConnection connection)
A factory method for creating instances of
WebSocketRequestHandler
for processing a web socket request |
org.apache.wicket.request.http.WebResponse |
newWebSocketResponse(IWebSocketConnection connection)
A factory method for the
WebResponse
that should be used to write the response back to the client/browser |
void |
setBaseUrl(CharSequence baseUrl) |
void |
setConnectionFilter(IWebSocketConnectionFilter connectionFilter)
Sets the filter for checking the incoming connections
|
WebSocketSettings |
setConnectionRegistry(IWebSocketConnectionRegistry connectionRegistry)
Sets the connection registry
|
void |
setContextPath(CharSequence contextPath) |
void |
setFilterPrefix(CharSequence filterPrefix) |
WebSocketSettings |
setSendPayloadExecutor(Executor sendPayloadExecutor)
The executor that broadcasts the
WebSocketPayload
via Wicket's event bus. |
WebSocketSettings |
setWebSocketPushMessageExecutor(Executor executor)
Set the executor for processing websocket push messages broadcasted to all sessions.
|
public WebSocketSettings setWebSocketPushMessageExecutor(Executor executor)
executor - The executor used for processing push messages.public Executor getWebSocketPushMessageExecutor()
public IWebSocketConnectionRegistry getConnectionRegistry()
public WebSocketSettings setConnectionRegistry(IWebSocketConnectionRegistry connectionRegistry)
connectionRegistry - The registry that tracks all currently connected WebSocket clientsthis, for method chainingpublic WebSocketSettings setSendPayloadExecutor(Executor sendPayloadExecutor)
WebSocketPayload
via Wicket's event bus.
Default executor does all the processing in the caller thread.sendPayloadExecutor - The executor used for broadcasting the events with web socket payloads to
WebSocketBehaviors and
WebSocketResources.public Executor getSendPayloadExecutor()
WebSocketPayload
via Wicket's event bus.WebSocketBehaviors and
WebSocketResources.public void setConnectionFilter(IWebSocketConnectionFilter connectionFilter)
connectionFilter - the filter for checking the incoming connectionsWebSocketConnectionFilterCollectionpublic IWebSocketConnectionFilter getConnectionFilter()
WebSocketConnectionFilterCollectionpublic org.apache.wicket.request.http.WebResponse newWebSocketResponse(IWebSocketConnection connection)
WebResponse
that should be used to write the response back to the client/browserconnection - The active web socket connectionpublic WebSocketRequestHandler newWebSocketRequestHandler(Page page, IWebSocketConnection connection)
WebSocketRequestHandler
for processing a web socket requestpage - The page with the web socket client. A dummy page in case of usage of
WebSocketResourceconnection - The active web socket connectionpublic org.apache.wicket.request.http.WebRequest newWebSocketRequest(javax.servlet.http.HttpServletRequest request, String filterPath)
WebRequest
that should be used in the WebSocket processing request cyclerequest - The upgraded http requestfilterPath - The configured filter path of WicketFilter in web.xmlpublic void setFilterPrefix(CharSequence filterPrefix)
public CharSequence getFilterPrefix()
public void setContextPath(CharSequence contextPath)
public CharSequence getContextPath()
public void setBaseUrl(CharSequence baseUrl)
public CharSequence getBaseUrl()
Copyright © 2006–2016 Apache Software Foundation. All rights reserved.