org.apache.ignite.plugin.extensions.communication

## Interface IgniteMessageFactory

All Superinterfaces:
  Extension, MessageFactory

All Known Implementing Classes:
  IgniteMessageFactoryImpl

    public interface IgniteMessageFactory
    extends MessageFactory

Message factory for all communication messages registered using `register(short, Supplier)` method call.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `register(short directType, Supplier<Message> supplier)` Register message factory with given direct type.

### Methods inherited from interface org.apache.ignite.plugin.extensions.communication.MessageFactory

`create`

### Method Detail

#### register

    void register(short directType,
                  Supplier<Message> supplier)
           throws IgniteException

Register message factory with given direct type. All messages must be registered during construction of class which implements this interface. Any invocation of this method after initialization is done must throw `IllegalStateException` exception.

Parameters:
  `directType` - Direct type.
  `supplier` - Message factory.
Throws:
  `IgniteException` - In case of attempt to register message with direct type which is already registered.
  `IllegalStateException` - On any invocation of this method when class which implements this interface is alredy constructed.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023