Package org.apache.ignite.plugin.extensions.communication

## Interface Message

All Superinterfaces:
  `Serializable`

All Known Subinterfaces:
  `CacheEntryPredicate`, `CacheObject`, `ExecutorAwareMessage`, `KeyCacheObject`, `TcpConnectionIndexAwareMessage`

All Known Implementing Classes:
  `AffinityTopologyVersion`, `BinaryEnumObjectImpl`, `BinaryObjectImpl`, `BinaryObjectOffheapImpl`, `CacheContinuousQueryBatchAck`, `CacheContinuousQueryEntry`, `CacheEntryInfoCollection`, `CacheEntryPredicateAdapter`, `CacheEntryPredicateContainsValue`, `CacheEntryPredicateHasValue`, `CacheEntryPredicateNoValue`, `CacheEntrySerializablePredicate`, `CacheEvictionEntry`, `CacheGroupAffinityMessage`, `CacheInvokeDirectResult`, `CacheObjectAdapter`, `CacheObjectByteArrayImpl`, `CacheObjectImpl`, `CacheVersionedValue`, `ClientMessage`, `ClusterMetricsUpdateMessage`, `ContinuousRoutineStartResultMessage`, `DataStreamerEntry`, `DataStreamerRequest`, `DataStreamerResponse`, `GenerateEncryptionKeyRequest`, `GenerateEncryptionKeyResponse`, `GridByteArrayList`, `GridCacheEntryInfo`, `GridCacheGroupIdMessage`, `GridCacheIdMessage`, `GridCacheMessage`, `GridCacheQueryRequest`, `GridCacheQueryResponse`, `GridCacheRawVersionedEntry`, `GridCacheReturn`, `GridCacheSqlQuery`, `GridCacheTtlUpdateRequest`, `GridCacheTxRecoveryRequest`, `GridCacheTxRecoveryResponse`, `GridCacheVersion`, `GridCacheVersionEx`, `GridChangeGlobalStateMessageResponse`, `GridCheckpointRequest`, `GridContinuousMessage`, `GridDeploymentInfoBean`, `GridDeploymentRequest`, `GridDeploymentResponse`, `GridDhtAffinityAssignmentRequest`, `GridDhtAffinityAssignmentResponse`, `GridDhtAtomicAbstractUpdateRequest`, `GridDhtAtomicDeferredUpdateResponse`, `GridDhtAtomicNearResponse`, `GridDhtAtomicSingleUpdateRequest`, `GridDhtAtomicUpdateRequest`, `GridDhtAtomicUpdateResponse`, `GridDhtForceKeysRequest`, `GridDhtForceKeysResponse`, `GridDhtLockRequest`, `GridDhtLockResponse`, `GridDhtPartitionDemandLegacyMessage`, `GridDhtPartitionDemandMessage`, `GridDhtPartitionExchangeId`, `GridDhtPartitionsAbstractMessage`, `GridDhtPartitionsFullMessage`, `GridDhtPartitionsSingleMessage`, `GridDhtPartitionsSingleRequest`, `GridDhtPartitionSupplyMessage`, `GridDhtPartitionSupplyMessageV2`, `GridDhtTxFinishRequest`, `GridDhtTxFinishResponse`, `GridDhtTxOnePhaseCommitAckRequest`, `GridDhtTxPrepareRequest`, `GridDhtTxPrepareResponse`, `GridDhtUnlockRequest`, `GridDistributedBaseMessage`, `GridDistributedLockRequest`, `GridDistributedLockResponse`, `GridDistributedTxFinishRequest`, `GridDistributedTxFinishResponse`, `GridDistributedTxPrepareRequest`, `GridDistributedTxPrepareResponse`, `GridDistributedUnlockRequest`, `GridEventStorageMessage`, `GridIntList`, `GridIoMessage`, `GridIoSecurityAwareMessage`, `GridIoUserMessage`, `GridJobCancelRequest`, `GridJobExecuteRequest`, `GridJobExecuteResponse`, `GridJobSiblingsRequest`, `GridJobSiblingsResponse`, `GridLongList`, `GridMessageCollection`, `GridNearAtomicAbstractSingleUpdateRequest`, `GridNearAtomicAbstractUpdateRequest`, `GridNearAtomicCheckUpdateRequest`, `GridNearAtomicFullUpdateRequest`, `GridNearAtomicSingleUpdateFilterRequest`, `GridNearAtomicSingleUpdateInvokeRequest`, `GridNearAtomicSingleUpdateRequest`, `GridNearAtomicUpdateResponse`, `GridNearGetRequest`, `GridNearGetResponse`, `GridNearLockRequest`, `GridNearLockResponse`, `GridNearSingleGetRequest`, `GridNearSingleGetResponse`, `GridNearTxFinishRequest`, `GridNearTxFinishResponse`, `GridNearTxPrepareRequest`, `GridNearTxPrepareResponse`, `GridNearUnlockRequest`, `GridQueryCancelRequest`, `GridQueryFailResponse`, `GridQueryKillRequest`, `GridQueryKillResponse`, `GridQueryNextPageRequest`, `GridQueryNextPageResponse`, `GridTaskCancelRequest`, `GridTaskResultRequest`, `GridTaskResultResponse`, `GridTaskSessionRequest`, `HandshakeMessage`, `HandshakeMessage2`, `HandshakeWaitMessage`, `IgniteCacheOffheapManagerImpl.ExpiredKeyCacheObject`, `IgniteDiagnosticMessage`, `IgniteIoTestMessage`, `IgniteTxEntry`, `IgniteTxKey`, `IncrementalSnapshotAwareMessage`, `JobStealingRequest`, `KeyCacheObjectImpl`, `LatchAckMessage`, `LongListReuseBag`, `MetadataRequestMessage`, `MetadataResponseMessage`, `MissingMappingRequestMessage`, `MissingMappingResponseMessage`, `NearCacheUpdates`, `NodeIdMessage`, `PartitionUpdateCountersMessage`, `PlatformCacheObjectImpl`, `RecoveryLastReceivedMessage`, `SchemaOperationStatusMessage`, `ServiceDeploymentProcessId`, `ServiceSingleNodeDeploymentResult`, `ServiceSingleNodeDeploymentResultBatch`, `SingleNodeMessage`, `SnapshotFilesFailureMessage`, `SnapshotFilesRequestMessage`, `StatisticsColumnData`, `StatisticsDecimalMessage`, `StatisticsKeyMessage`, `StatisticsObjectData`, `StatisticsRequest`, `StatisticsResponse`, `TcpInverseConnectionResponseMessage`, `TxEntryValueHolder`, `TxLock`, `TxLockList`, `TxLocksRequest`, `TxLocksResponse`, `UpdateErrors`, `UserAuthenticateRequestMessage`, `UserAuthenticateResponseMessage`, `UserCacheObjectByteArrayImpl`, `UserCacheObjectImpl`, `UserKeyCacheObjectImpl`, `UserManagementOperationFinishedMessage`, `UUIDCollectionMessage`, `WalStateAckMessage`

    public interface Message
    extends Serializable

Base class for all communication messages.

### Field Summary

Fields
`static int` `DIRECT_TYPE_SIZE` Direct type size in bytes.

### Method Summary

All Methods Instance Methods Abstract Methods
`short` `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.

### Field Detail

#### DIRECT_TYPE_SIZE

    static final int DIRECT_TYPE_SIZE

Direct type size in bytes.

See Also:
  Constant Field Values

### 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

    short 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.