class IgniteMessageFactoryImpl implements IgniteMessageFactory {

    @Override public @Nullable Message create(short directType) {
        Supplier<Message> supplier = msgSuppliers[directTypeToIndex(directType)];

        if (supplier == null)
            throw new IgniteException("Invalid message type: " + directType);

        return supplier.get();
    }

    public  IgniteMessageFactoryImpl(MessageFactory[] factories);

}