@ManagedObject(value="WebSocket Upgrade Filter") public class WebSocketUpgradeFilter extends Object implements javax.servlet.Filter, MappedWebSocketCreator, 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(WebSocketServerFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
addMapping(PathSpec spec,
WebSocketCreator creator)
Add a mapping.
|
void |
addMapping(PathSpec spec,
WebSocketCreator creator)
Deprecated.
|
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() |
MappedResource<WebSocketCreator> |
getMapping(String target)
Get specific MappedResource for associated target.
|
void |
init(javax.servlet.FilterConfig config) |
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(WebSocketServerFactory factory)
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.ServletException
public void addMapping(PathSpec spec, WebSocketCreator creator)
MappedWebSocketCreator
addMapping
in interface MappedWebSocketCreator
spec
- the path spec to usecreator
- the creator for the mapping@Deprecated public void addMapping(PathSpec spec, WebSocketCreator creator)
addMapping(org.eclipse.jetty.http.pathmap.PathSpec, WebSocketCreator)
insteadMappedWebSocketCreator
addMapping
in interface MappedWebSocketCreator
spec
- the path spec to usecreator
- the creator for the mappingpublic void destroy()
destroy
in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
IOException
javax.servlet.ServletException
public void dump(Appendable out, String indent) throws IOException
dump
in interface Dumpable
IOException
public WebSocketServletFactory getFactory()
@ManagedAttribute(value="configuration", readonly=true) public NativeWebSocketConfiguration getConfiguration()
public MappedResource<WebSocketCreator> getMapping(String target)
MappedWebSocketCreator
getMapping
in interface MappedWebSocketCreator
target
- the target to get mapping forpublic void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
public void setToAttribute(javax.servlet.ServletContext context, String key) throws javax.servlet.ServletException
javax.servlet.ServletException
Copyright © 1995–2016 Webtide. All rights reserved.