org.eclipse.jetty.websocket
类 WebSocketParserD00

java.lang.Object
  继承者 org.eclipse.jetty.websocket.WebSocketParserD00
所有已实现的接口:
WebSocketParser

public class WebSocketParserD00
extends Object
implements WebSocketParser

Parser the WebSocket protocol.


嵌套类摘要
 
从接口 org.eclipse.jetty.websocket.WebSocketParser 继承的嵌套类/接口
WebSocketParser.FrameHandler
 
字段摘要
static int STATE_DATA
           
static int STATE_LENGTH
           
static int STATE_SENTINEL_DATA
           
static int STATE_START
           
 
构造方法摘要
WebSocketParserD00(WebSocketBuffers buffers, EndPoint endp, WebSocketParser.FrameHandler handler)
           
 
方法摘要
 void fill(Buffer buffer)
           
 Buffer getBuffer()
           
 boolean isBufferEmpty()
           
 int parseNext()
          Parse to next event.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

STATE_START

public static final int STATE_START
另请参见:
常量字段值

STATE_SENTINEL_DATA

public static final int STATE_SENTINEL_DATA
另请参见:
常量字段值

STATE_LENGTH

public static final int STATE_LENGTH
另请参见:
常量字段值

STATE_DATA

public static final int STATE_DATA
另请参见:
常量字段值
构造方法详细信息

WebSocketParserD00

public WebSocketParserD00(WebSocketBuffers buffers,
                          EndPoint endp,
                          WebSocketParser.FrameHandler handler)
参数:
buffers - The buffers to use for parsing. Only the Buffers.getBuffer() is used. This should be a direct buffer if binary data is mostly used or an indirect buffer if utf-8 data is mostly used.
endp - the endpoint
handler - the handler to notify when a parse event occurs
方法详细信息

isBufferEmpty

public boolean isBufferEmpty()
指定者:
接口 WebSocketParser 中的 isBufferEmpty

getBuffer

public Buffer getBuffer()
指定者:
接口 WebSocketParser 中的 getBuffer

parseNext

public int parseNext()
Parse to next event. Parse to the next WebSocketParser.FrameHandler event or until no more data is available. Fill data from the EndPoint only as necessary.

指定者:
接口 WebSocketParser 中的 parseNext
返回:
An indication of progress or otherwise. -1 indicates EOF, 0 indicates that no bytes were read and no messages parsed. A positive number indicates either the bytes filled or the messages parsed.

fill

public void fill(Buffer buffer)
指定者:
接口 WebSocketParser 中的 fill


Copyright © 2013. All Rights Reserved.