forked from MagicBane/Server
Project cleanup pre merge.
This commit is contained in:
@@ -19,55 +19,55 @@ import engine.net.client.Protocol;
|
||||
|
||||
public abstract class ClientNetMsg extends AbstractNetMsg {
|
||||
|
||||
/**
|
||||
* This is the general purpose constructor.
|
||||
*/
|
||||
protected ClientNetMsg(Protocol protocolMsg) {
|
||||
super(protocolMsg);
|
||||
}
|
||||
/**
|
||||
* This is the general purpose constructor.
|
||||
*/
|
||||
protected ClientNetMsg(Protocol protocolMsg) {
|
||||
super(protocolMsg);
|
||||
}
|
||||
|
||||
protected ClientNetMsg(Protocol protocolMsg, ClientNetMsg msg) {
|
||||
super(protocolMsg, msg);
|
||||
}
|
||||
protected ClientNetMsg(Protocol protocolMsg, ClientNetMsg msg) {
|
||||
super(protocolMsg, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor is used by NetMsgFactory. It attempts to deserialize the
|
||||
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
|
||||
* past the limit) then this constructor Throws that Exception to the
|
||||
* caller.
|
||||
*/
|
||||
protected ClientNetMsg(Protocol protocolMsg, AbstractConnection origin,
|
||||
ByteBufferReader reader) {
|
||||
super(protocolMsg, origin, reader);
|
||||
}
|
||||
/**
|
||||
* This constructor is used by NetMsgFactory. It attempts to deserialize the
|
||||
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
|
||||
* past the limit) then this constructor Throws that Exception to the
|
||||
* caller.
|
||||
*/
|
||||
protected ClientNetMsg(Protocol protocolMsg, AbstractConnection origin,
|
||||
ByteBufferReader reader) {
|
||||
super(protocolMsg, origin, reader);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected abstract void _deserialize(ByteBufferReader reader)
|
||||
;
|
||||
/**
|
||||
* Deserializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected abstract void _deserialize(ByteBufferReader reader)
|
||||
;
|
||||
|
||||
/**
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected abstract void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException;
|
||||
/**
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected abstract void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException;
|
||||
|
||||
/*
|
||||
* return the header size of 4 for ClientMsgs
|
||||
*/
|
||||
@Override
|
||||
protected int getHeaderSize() {
|
||||
return 4;
|
||||
}
|
||||
/*
|
||||
* return the header size of 4 for ClientMsgs
|
||||
*/
|
||||
@Override
|
||||
protected int getHeaderSize() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
/*
|
||||
* Write in the header for ClientMsgs
|
||||
*/
|
||||
@Override
|
||||
protected void writeHeaderAt(int startPos, ByteBufferWriter writer) {
|
||||
writer.putIntAt(this.getProtocolMsg().opcode, startPos);
|
||||
}
|
||||
/*
|
||||
* Write in the header for ClientMsgs
|
||||
*/
|
||||
@Override
|
||||
protected void writeHeaderAt(int startPos, ByteBufferWriter writer) {
|
||||
writer.putIntAt(this.getProtocolMsg().opcode, startPos);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user