- java.lang.Object
-
- org.redkale.net.http.WebSocketPacket
-
public final class WebSocketPacket extends Object
详情见: https://redkale.org- 作者:
- zhangjx
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static class
WebSocketPacket.FrameType
static class
WebSocketPacket.MessageType
-
字段概要
字段 修饰符和类型 字段 说明 static WebSocketPacket
DEFAULT_PING_PACKET
protected boolean
last
static Object
MESSAGE_NIL
protected byte[]
payload
protected WebSocketPacket.FrameType
type
-
构造器概要
构造器 构造器 说明 WebSocketPacket()
WebSocketPacket(Serializable message, boolean last)
WebSocketPacket(WebSocketPacket.FrameType type, byte[] data)
WebSocketPacket(WebSocketPacket.FrameType type, byte[] data, boolean last)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 byte[]
getPayload()
WebSocketPacket.FrameType
getType()
boolean
isLast()
void
setLast(boolean last)
void
setPayload(byte[] payload)
void
setType(WebSocketPacket.FrameType type)
String
toSimpleString()
String
toString()
void
writeEncode(ByteArray array)
-
-
-
字段详细资料
-
MESSAGE_NIL
public static final Object MESSAGE_NIL
-
DEFAULT_PING_PACKET
public static final WebSocketPacket DEFAULT_PING_PACKET
-
type
protected WebSocketPacket.FrameType type
-
payload
protected byte[] payload
-
last
protected boolean last
-
-
构造器详细资料
-
WebSocketPacket
public WebSocketPacket()
-
WebSocketPacket
public WebSocketPacket(WebSocketPacket.FrameType type, byte[] data)
-
WebSocketPacket
public WebSocketPacket(WebSocketPacket.FrameType type, byte[] data, boolean last)
-
WebSocketPacket
public WebSocketPacket(Serializable message, boolean last)
-
-
方法详细资料
-
writeEncode
public void writeEncode(ByteArray array)
-
getPayload
public byte[] getPayload()
-
isLast
public boolean isLast()
-
getType
public WebSocketPacket.FrameType getType()
-
setType
public void setType(WebSocketPacket.FrameType type)
-
setPayload
public void setPayload(byte[] payload)
-
setLast
public void setLast(boolean last)
-
toSimpleString
public String toSimpleString()
-
-