public abstract class BaseMessage<T> extends Message<T>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
address |
protected DefaultEventBus |
bus |
protected ServerID |
sender |
body, replyAddress
Modifier | Constructor and Description |
---|---|
protected |
BaseMessage(boolean send,
java.lang.String address,
T body) |
protected |
BaseMessage(Buffer readBuff) |
Modifier and Type | Method and Description |
---|---|
protected abstract Message<T> |
copy() |
protected abstract BaseMessage |
createReplyMessage(T reply) |
protected abstract int |
getBodyLength() |
protected abstract void |
readBody(int pos,
Buffer readBuff) |
void |
reply(T message,
Handler<Message<T>> replyHandler)
The same as
reply(T message) but you can specify handler for the reply - i.e. |
protected abstract byte |
type() |
protected void |
write(NetSocket socket) |
protected abstract void |
writeBody(Buffer buff) |
protected void |
writeString(Buffer buff,
java.lang.String str) |
protected ServerID sender
protected DefaultEventBus bus
protected java.lang.String address
protected BaseMessage(boolean send, java.lang.String address, T body)
protected BaseMessage(Buffer readBuff)
public void reply(T message, Handler<Message<T>> replyHandler)
Message
reply(T message)
but you can specify handler for the reply - i.e.
to receive the reply to the reply.protected void write(NetSocket socket)
protected void writeString(Buffer buff, java.lang.String str)
protected abstract byte type()
protected abstract void readBody(int pos, Buffer readBuff)
protected abstract void writeBody(Buffer buff)
protected abstract int getBodyLength()
protected abstract BaseMessage createReplyMessage(T reply)