Interface MessageFactory
- 
 public interface MessageFactoryMessage factory for all communication messages registered usingregister(short, Supplier)method call.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description Messagecreate(short type)Creates new message instance of provided type.voidregister(short directType, Supplier<Message> supplier)Register message factory with given direct type.
 
- 
- 
- 
Method Detail- 
registervoid register(short directType, Supplier<Message> supplier) throws IgniteExceptionRegister 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 throwIllegalStateExceptionexception.- 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.
 
 - 
createMessage create(short type) Creates new message instance of provided type.This method should return nullif provided message type is unknown to this factory.- Parameters:
- type- Message type.
- Returns:
- Message instance.
 
 
- 
 
-