Class ClientMessage
- java.lang.Object
-
- org.apache.ignite.internal.processors.odbc.ClientMessage
-
- All Implemented Interfaces:
Externalizable,Serializable,Message
public class ClientMessage extends Object implements Message, Externalizable
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message
DIRECT_TYPE_SIZE
-
-
Constructor Summary
Constructors Constructor Description ClientMessage()ClientMessage(boolean isFirstMessage)ClientMessage(byte[] data)ClientMessage(BinaryHeapOutputStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description shortdirectType()Gets message type.bytefieldsCount()Gets fields count.voidonAckReceived()Method called when ack message received.byte[]payload()voidreadExternal(ObjectInput in)booleanreadFrom(ByteBuffer buf)Reads this message from provided byte buffer.booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.voidwriteExternal(ObjectOutput out)booleanwriteTo(ByteBuffer buf, MessageWriter ignored)Writes this message to provided byte buffer.
-
-
-
Constructor Detail
-
ClientMessage
public ClientMessage()
-
ClientMessage
public ClientMessage(boolean isFirstMessage)
-
ClientMessage
public ClientMessage(byte[] data)
-
ClientMessage
public ClientMessage(BinaryHeapOutputStream stream)
-
-
Method Detail
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter ignored)
Writes this message to provided byte buffer.
-
readFrom
public boolean readFrom(ByteBuffer buf, MessageReader reader)
Reads this message from provided byte buffer.
-
readFrom
public boolean readFrom(ByteBuffer buf) throws IOException
Reads this message from provided byte buffer.- Parameters:
buf- Byte buffer.- Returns:
- Whether message was fully read.
- Throws:
IOException
-
directType
public short directType()
Gets message type.- Specified by:
directTypein interfaceMessage- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Returns:
- Fields count.
-
onAckReceived
public void onAckReceived()
Method called when ack message received.- Specified by:
onAckReceivedin interfaceMessage
-
payload
public byte[] payload()
- Returns:
- Message payload.
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-