public class Packet extends Object implements Serializable
| Modifier | Constructor and Description |
|---|---|
protected |
Packet() |
|
Packet(PacketType type) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(io.netty.buffer.ByteBuf attachment) |
Long |
getAckId() |
List<io.netty.buffer.ByteBuf> |
getAttachments() |
<T> T |
getData()
Get packet data
|
io.netty.buffer.ByteBuf |
getDataSource() |
String |
getName() |
String |
getNsp() |
PacketType |
getSubType() |
PacketType |
getType() |
boolean |
hasAttachments() |
void |
initAttachments(int attachmentsCount) |
boolean |
isAckRequested() |
boolean |
isAttachmentsLoaded() |
void |
setAckId(Long ackId) |
void |
setData(Object data) |
void |
setDataSource(io.netty.buffer.ByteBuf dataSource) |
void |
setName(String name) |
void |
setNsp(String endpoint) |
void |
setSubType(PacketType subType) |
String |
toString() |
protected Packet()
public Packet(PacketType type)
public PacketType getSubType()
public void setSubType(PacketType subType)
public PacketType getType()
public void setData(Object data)
public <T> T getData()
PacketType.JSON type
message for PacketType.MESSAGE type
public void setNsp(String endpoint)
public String getNsp()
public String getName()
public void setName(String name)
public Long getAckId()
public void setAckId(Long ackId)
public boolean isAckRequested()
public void initAttachments(int attachmentsCount)
public void addAttachment(io.netty.buffer.ByteBuf attachment)
public List<io.netty.buffer.ByteBuf> getAttachments()
public boolean hasAttachments()
public boolean isAttachmentsLoaded()
public io.netty.buffer.ByteBuf getDataSource()
public void setDataSource(io.netty.buffer.ByteBuf dataSource)
Copyright © 2012–2016. All rights reserved.