public abstract class AbstractLocalPacket extends Object
Modifier and Type | Field and Description |
---|---|
protected static byte[] |
EMPTY_ARRAY |
protected io.netty.buffer.ByteBuf |
end |
protected io.netty.buffer.ByteBuf |
global |
protected io.netty.buffer.ByteBuf |
header |
protected static int |
LOCAL_HEADER_SIZE |
protected io.netty.buffer.ByteBuf |
middle |
Modifier | Constructor and Description |
---|---|
protected |
AbstractLocalPacket() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
abstract void |
createAllBuffers(LocalChannelReference lcr,
int networkHeader)
Prepare the 3 buffers Header, Middle and End
|
void |
createEnd(LocalChannelReference lcr)
Prepare the End buffer
|
void |
createHeader(LocalChannelReference lcr)
Prepare the Header buffer
|
void |
createMiddle(LocalChannelReference lcr)
Prepare the Middle buffer
|
io.netty.buffer.ByteBuf |
getLocalPacket(LocalChannelReference lcr) |
io.netty.buffer.ByteBuf |
getLocalPacketForNetworkPacket(LocalChannelReference lcr,
NetworkPacket packet) |
abstract byte |
getType() |
abstract boolean |
hasGlobalBuffer() |
void |
retain() |
abstract String |
toString() |
protected static final byte[] EMPTY_ARRAY
protected static final int LOCAL_HEADER_SIZE
protected io.netty.buffer.ByteBuf header
protected io.netty.buffer.ByteBuf middle
protected io.netty.buffer.ByteBuf end
protected io.netty.buffer.ByteBuf global
public abstract boolean hasGlobalBuffer()
public abstract void createAllBuffers(LocalChannelReference lcr, int networkHeader) throws OpenR66ProtocolPacketException
OpenR66ProtocolPacketException
public void createHeader(LocalChannelReference lcr) throws OpenR66ProtocolPacketException
OpenR66ProtocolPacketException
public void createMiddle(LocalChannelReference lcr) throws OpenR66ProtocolPacketException
OpenR66ProtocolPacketException
public void createEnd(LocalChannelReference lcr) throws OpenR66ProtocolPacketException
OpenR66ProtocolPacketException
public abstract byte getType()
public final io.netty.buffer.ByteBuf getLocalPacket(LocalChannelReference lcr) throws OpenR66ProtocolPacketException
lcr
- the LocalChannelReference in useOpenR66ProtocolPacketException
public final io.netty.buffer.ByteBuf getLocalPacketForNetworkPacket(LocalChannelReference lcr, NetworkPacket packet) throws OpenR66ProtocolPacketException
lcr
- the LocalChannelReference in useOpenR66ProtocolPacketException
public void clear()
public final void retain()
Copyright © 2009–2022 Waarp. All rights reserved.