org.apache.wicket.protocol.http
Class AbstractUpgradeFilter
java.lang.Object
org.apache.wicket.protocol.http.WicketFilter
org.apache.wicket.protocol.http.AbstractUpgradeFilter
- All Implemented Interfaces:
- javax.servlet.Filter
public class AbstractUpgradeFilter
- extends WicketFilter
An extension of WicketFilter that is used to check whether
the processed HttpServletRequest needs to upgrade its protocol
from HTTP to something else
- Since:
- 6.0
|
Method Summary |
protected boolean |
acceptWebSocket(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
Application application)
|
protected List<String> |
getTokensFromHeader(javax.servlet.http.HttpServletRequest req,
String headerName)
|
protected String |
selectSubProtocol(List<String> subProtocols)
Intended to be overridden by sub-classes that wish to select a
sub-protocol if the client provides a list of supported protocols. |
protected boolean |
verifyOrigin(String origin)
Intended to be overridden by sub-classes that wish to verify the origin
of a WebSocket request before processing it. |
| Methods inherited from class org.apache.wicket.protocol.http.WicketFilter |
checkIfRedirectRequired, destroy, doFilter, getApplication, getApplicationFactory, getClassLoader, getFilterConfig, getFilterPath, getFilterPath, getFilterPathFromAnnotation, getFilterPathFromConfig, getFilterPathFromWebXml, getRelativePath, init, init, setFilterPath |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractUpgradeFilter
public AbstractUpgradeFilter()
acceptWebSocket
protected boolean acceptWebSocket(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
Application application)
throws javax.servlet.ServletException,
IOException
- Throws:
javax.servlet.ServletException
IOException
getTokensFromHeader
protected List<String> getTokensFromHeader(javax.servlet.http.HttpServletRequest req,
String headerName)
verifyOrigin
protected boolean verifyOrigin(String origin)
- Intended to be overridden by sub-classes that wish to verify the origin
of a WebSocket request before processing it.
- Parameters:
origin - The value of the origin header from the request which
may be null
- Returns:
true to accept the request. false to
reject it. This default implementation always returns
true.
selectSubProtocol
protected String selectSubProtocol(List<String> subProtocols)
- Intended to be overridden by sub-classes that wish to select a
sub-protocol if the client provides a list of supported protocols.
- Parameters:
subProtocols - The list of sub-protocols supported by the client
in client preference order. The server is under no
obligation to respect the declared preference
- Returns:
null if no sub-protocol is selected or the name of
the protocol which must be one of the protocols listed by
the client. This default implementation always returns
null.
Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.