org.apache.ignite.plugin.extensions.communication

## Interface Message

All Superinterfaces:
  Serializable

All Known Subinterfaces:
  CacheEntryPredicate, CacheObject, KeyCacheObject

All Known Implementing Classes:
  AffinityTopologyVersion, BinaryEnumObjectImpl, BinaryObjectImpl, BinaryObjectOffheapImpl, CacheContinuousQueryBatchAck, CacheContinuousQueryEntry, CacheEntryInfoCollection, CacheEntryPredicateAdapter, CacheEntryPredicateContainsValue, CacheEntryPredicateHasValue, CacheEntryPredicateNoValue, CacheEntrySerializablePredicate, CacheEvictionEntry, CacheInvokeDirectResult, CacheObjectAdapter, CacheObjectByteArrayImpl, CacheObjectImpl, CacheVersionedValue, DataStreamerEntry, DataStreamerRequest, DataStreamerResponse, GridByteArrayList, GridCacheEntryInfo, GridCacheEvictionRequest, GridCacheEvictionResponse, GridCacheMessage, GridCacheQueryRequest, GridCacheQueryResponse, GridCacheRawVersionedEntry, GridCacheReturn, GridCacheSqlQuery, GridCacheTtlUpdateRequest, GridCacheTxRecoveryRequest, GridCacheTxRecoveryResponse, GridCacheVersion, GridCacheVersionEx, GridCheckpointRequest, GridClockDeltaSnapshotMessage, GridClockDeltaVersion, GridContinuousMessage, GridDeploymentInfoBean, GridDeploymentRequest, GridDeploymentResponse, GridDhtAffinityAssignmentRequest, GridDhtAffinityAssignmentResponse, GridDhtAtomicDeferredUpdateResponse, GridDhtAtomicUpdateRequest, GridDhtAtomicUpdateResponse, GridDhtForceKeysRequest, GridDhtForceKeysResponse, GridDhtLockRequest, GridDhtLockResponse, GridDhtPartitionDemandMessage, GridDhtPartitionExchangeId, GridDhtPartitionsFullMessage, GridDhtPartitionsSingleMessage, GridDhtPartitionsSingleRequest, GridDhtPartitionSupplyMessage, GridDhtPartitionSupplyMessageV2, GridDhtTxFinishRequest, GridDhtTxFinishResponse, GridDhtTxPrepareRequest, GridDhtTxPrepareResponse, GridDhtUnlockRequest, GridDistributedBaseMessage, GridDistributedLockRequest, GridDistributedLockResponse, GridDistributedTxFinishRequest, GridDistributedTxFinishResponse, GridDistributedTxPrepareRequest, GridDistributedTxPrepareResponse, GridDistributedUnlockRequest, GridEventStorageMessage, GridIoMessage, GridIoUserMessage, GridJobCancelRequest, GridJobExecuteRequest, GridJobExecuteResponse, GridJobSiblingsRequest, GridJobSiblingsResponse, GridLongList, GridMessageCollection, GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse, GridNearGetRequest, GridNearGetResponse, GridNearLockRequest, GridNearLockResponse, GridNearSingleGetRequest, GridNearSingleGetResponse, GridNearTxFinishRequest, GridNearTxFinishResponse, GridNearTxPrepareRequest, GridNearTxPrepareResponse, GridNearUnlockRequest, GridQueryCancelRequest, GridQueryFailResponse, GridQueryNextPageRequest, GridQueryNextPageResponse, GridQueryRequest, GridTaskCancelRequest, GridTaskResultRequest, GridTaskResultResponse, GridTaskSessionRequest, IgfsAckMessage, IgfsBlockKey, IgfsBlocksMessage, IgfsCommunicationMessage, IgfsDeleteMessage, IgfsFileAffinityRange, IgfsFragmentizerRequest, IgfsFragmentizerResponse, IgfsSyncMessage, IgniteTxEntry, IgniteTxKey, JobStealingRequest, KeyCacheObjectImpl, TcpCommunicationSpi.HandshakeMessage, TcpCommunicationSpi.NodeIdMessage, TcpCommunicationSpi.RecoveryLastReceivedMessage, TxEntryValueHolder, TxLock, TxLockList, TxLocksRequest, TxLocksResponse, UUIDCollectionMessage

    public interface Message
    extends Serializable

Base class for all communication messages.

### Method Summary

Methods
`byte` `directType()` Gets message type.
`byte` `fieldsCount()` Gets fields count.
`void` `onAckReceived()` Method called when ack message received.
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

### Method Detail

#### writeTo

    boolean writeTo(ByteBuffer buf,
                  MessageWriter writer)

Writes this message to provided byte buffer.

Parameters:
  `buf` - Byte buffer.
  `writer` - Writer.
Returns:
  Whether message was fully written.

#### readFrom

    boolean readFrom(ByteBuffer buf,
                   MessageReader reader)

Reads this message from provided byte buffer.

Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### directType

    byte directType()

Gets message type.

Returns:
  Message type.

#### fieldsCount

    byte fieldsCount()

Gets fields count.

Returns:
  Fields count.

#### onAckReceived

    void onAckReceived()

Method called when ack message received.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.6.0
Release Date | : May 18 2016