@ManagedObject(value="WebSocket Upgrade Filter") public class WebSocketUpgradeFilter extends org.eclipse.jetty.util.component.AbstractLifeCycle implements javax.servlet.Filter, MappedWebSocketCreator, org.eclipse.jetty.util.component.Dumpable
WebSocketCreator objects.| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_ATTRIBUTE_KEY |
static String |
CONTEXT_ATTRIBUTE_KEY |
| Constructor and Description |
|---|
WebSocketUpgradeFilter() |
WebSocketUpgradeFilter(NativeWebSocketConfiguration configuration) |
WebSocketUpgradeFilter(org.eclipse.jetty.websocket.api.WebSocketPolicy policy,
org.eclipse.jetty.io.ByteBufferPool bufferPool) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMapping(PathSpec spec,
WebSocketCreator creator)
Add a mapping.
|
void |
addMapping(PathSpec spec,
WebSocketCreator creator)
Deprecated.
|
void |
addMapping(String spec,
WebSocketCreator creator)
Add a mapping, of a pathspec to a WebSocketCreator.
|
static WebSocketUpgradeFilter |
configureContext(javax.servlet.ServletContext context)
Deprecated.
use
configureContext(ServletContextHandler) instead |
static WebSocketUpgradeFilter |
configureContext(ServletContextHandler context) |
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
String |
dump() |
void |
dump(Appendable out,
String indent) |
NativeWebSocketConfiguration |
getConfiguration() |
WebSocketServletFactory |
getFactory() |
WebSocketCreator |
getMapping(String target)
Returns the creator for the given path spec.
|
PathMappings<WebSocketCreator> |
getMappings()
Deprecated.
|
void |
init(javax.servlet.FilterConfig config) |
boolean |
removeMapping(String spec)
Removes the mapping based on the given path spec.
|
void |
setToAttribute(javax.servlet.ServletContext context,
String key) |
String |
toString() |
public static final String CONTEXT_ATTRIBUTE_KEY
public static final String CONFIG_ATTRIBUTE_KEY
public WebSocketUpgradeFilter()
public WebSocketUpgradeFilter(org.eclipse.jetty.websocket.api.WebSocketPolicy policy,
org.eclipse.jetty.io.ByteBufferPool bufferPool)
public WebSocketUpgradeFilter(NativeWebSocketConfiguration configuration)
public static WebSocketUpgradeFilter configureContext(ServletContextHandler context) throws javax.servlet.ServletException
javax.servlet.ServletException@Deprecated public static WebSocketUpgradeFilter configureContext(javax.servlet.ServletContext context) throws javax.servlet.ServletException
configureContext(ServletContextHandler) insteadjavax.servlet.ServletExceptionpublic void addMapping(PathSpec spec, WebSocketCreator creator)
MappedWebSocketCreatoraddMapping in interface MappedWebSocketCreatorspec - the path spec to usecreator - the creator for the mapping@Deprecated public void addMapping(PathSpec spec, WebSocketCreator creator)
MappedWebSocketCreatoraddMapping in interface MappedWebSocketCreatorspec - the path spec to usecreator - the creator for the mappingpublic void addMapping(String spec, WebSocketCreator creator)
MappedWebSocketCreatorRecognized Path Spec syntaxes
/path/to or / or *.ext or servlet|{spec}^{spec} or regex|{spec}uri-template|{spec}addMapping in interface MappedWebSocketCreatorspec - the path spec to use.creator - the websocket creator for this specific mappingpublic boolean removeMapping(String spec)
MappedWebSocketCreatorremoveMapping in interface MappedWebSocketCreatorspec - the path spec to remove (using the same spec syntax as seen in MappedWebSocketCreator.addMapping(String, WebSocketCreator))public void destroy()
destroy in interface javax.servlet.Filterpublic void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionpublic String dump()
dump in interface org.eclipse.jetty.util.component.Dumpablepublic void dump(Appendable out, String indent) throws IOException
dump in interface org.eclipse.jetty.util.component.DumpableIOExceptionpublic WebSocketServletFactory getFactory()
@ManagedAttribute(value="configuration",
readonly=true)
public NativeWebSocketConfiguration getConfiguration()
public WebSocketCreator getMapping(String target)
MappedWebSocketCreatorgetMapping in interface MappedWebSocketCreatortarget - @param spec the spec to test for (using the same spec syntax as seen in MappedWebSocketCreator.addMapping(String, WebSocketCreator))@Deprecated public PathMappings<WebSocketCreator> getMappings()
MappedWebSocketCreatorgetMappings in interface MappedWebSocketCreatorpublic void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionpublic void setToAttribute(javax.servlet.ServletContext context,
String key)
throws javax.servlet.ServletException
javax.servlet.ServletExceptionCopyright © 1995-2018 Webtide. All Rights Reserved.