|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.eclipse.jetty.websocket.WebSocketServlet
public abstract class WebSocketServlet
Servlet to upgrade connections to WebSocket
The request must have the correct upgrade headers, else it is handled as a normal servlet request. The initParameter "bufferSize" can be used to set the buffer size, which is also the max frame byte size (default 8192). The initParameter "maxIdleTime" can be used to set the time in ms that a websocket may be idle before closing. The initParameter "maxTextMessagesSize" can be used to set the size in characters that a websocket may be accept before closing. The initParameter "maxBinaryMessagesSize" can be used to set the size in bytes that a websocket may be accept before closing. The initParameter "minVersion" can be used to set the minimum protocol version accepted. Default is the RFC6455 version (13)
| 构造方法摘要 | |
|---|---|
WebSocketServlet()
|
|
| 方法摘要 | |
|---|---|
boolean |
checkOrigin(HttpServletRequest request,
String origin)
Checks the origin of an incoming WebSocket handshake request. |
void |
destroy()
Called by the servlet container to indicate to a servlet that the servlet is being taken out of service. |
void |
init()
A convenience method which can be overridden so that there's no need to call super.init(config). |
protected void |
service(HttpServletRequest request,
HttpServletResponse response)
Receives standard HTTP requests from the public service method and dispatches
them to the doXXX methods defined in
this class. |
| 从类 javax.servlet.http.HttpServlet 继承的方法 |
|---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
| 从类 javax.servlet.GenericServlet 继承的方法 |
|---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 从接口 org.eclipse.jetty.websocket.WebSocketFactory.Acceptor 继承的方法 |
|---|
doWebSocketConnect |
| 构造方法详细信息 |
|---|
public WebSocketServlet()
| 方法详细信息 |
|---|
public void init()
throws ServletException
GenericServlet 复制的描述super.init(config).
Instead of overriding GenericServlet.init(ServletConfig), simply override
this method and it will be called by
GenericServlet.init(ServletConfig config).
The ServletConfig object can still be retrieved via GenericServlet.getServletConfig().
GenericServlet 中的 initServletException - if an exception occurs that
interrupts the servlet's
normal operationGenericServlet.init()
protected void service(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
HttpServlet 复制的描述service method and dispatches
them to the doXXX methods defined in
this class. This method is an HTTP-specific version of the
Servlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) method. There's no
need to override this method.
HttpServlet 中的 servicerequest - the HttpServletRequest object that
contains the request the client made of
the servletresponse - the HttpServletResponse object that
contains the response the servlet returns
to the client
ServletException - if the HTTP request
cannot be handled
IOException - if an input or output error occurs
while the servlet is handling the
HTTP requestHttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
public boolean checkOrigin(HttpServletRequest request,
String origin)
WebSocketFactory.Acceptor 复制的描述Checks the origin of an incoming WebSocket handshake request.
WebSocketFactory.Acceptor 中的 checkOriginrequest - the incoming HTTP upgrade requestorigin - the origin URI
public void destroy()
GenericServlet 复制的描述Servlet.destroy().
Servlet 中的 destroyGenericServlet 中的 destroy
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||