org.apache.ignite.internal.managers.communication

## Class GridIoMessage

- java.lang.Object
- - org.apache.ignite.internal.managers.communication.GridIoMessage

All Implemented Interfaces:
  Serializable, Message

    public class GridIoMessage
    extends Object
    implements Message

Wrapper for all grid messages.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`GridIoMessage()` No-op constructor to support `Externalizable` interface.
`GridIoMessage(byte plc, Object topic, int topicOrd, Message msg, boolean ordered, long timeout, boolean skipOnTimeout)`

### Method Summary

Methods
`byte` `directType()` Gets message type.
`boolean` `equals(Object obj)`
`byte` `fieldsCount()` Gets fields count.
`int` `hashCode()`
`Message` `message()`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`boolean` `skipOnTimeout()`
`long` `timeout()`
`String` `toString()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### GridIoMessage

    public GridIoMessage()

No-op constructor to support `Externalizable` interface. This constructor is not meant to be used for other purposes.

#### GridIoMessage

    public GridIoMessage(byte plc,
                 Object topic,
                 int topicOrd,
                 Message msg,
                 boolean ordered,
                 long timeout,
                 boolean skipOnTimeout)

Parameters:
  `plc` - Policy.
  `topic` - Communication topic.
  `topicOrd` - Topic ordinal value.
  `msg` - Message.
  `ordered` - Message ordered flag.
  `timeout` - Timeout.
  `skipOnTimeout` - Whether message can be skipped on timeout.

### Method Detail

#### message

    public Message message()

Returns:
  Message.

#### timeout

    public long timeout()

Returns:
  Message timeout.

#### skipOnTimeout

    public boolean skipOnTimeout()

Returns:
  Whether message can be skipped on timeout.

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                  MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
Parameters:
  `buf` - Byte buffer.
  `writer` - Writer.
Returns:
  Whether message was fully written.

#### readFrom

    public boolean readFrom(ByteBuffer buf,
                   MessageReader reader)

Reads this message from provided byte buffer.

Specified by:
  `readFrom` in interface `Message`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### directType

    public byte directType()

Gets message type.

Specified by:
  `directType` in interface `Message`
Returns:
  Message type.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

Specified by:
  `fieldsCount` in interface `Message`
Returns:
  Fields count.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0-b1
Release Date | : December 1 2015