@Test(expected = IgniteException.class) public void testCreate_UnknownMessageType() { MessageFactory[] factories = {new TestMessageFactoryPovider(), new TestMessageFactory()}; IgniteMessageFactory msgFactory = new IgniteMessageFactoryImpl(factories); msgFactory.create(UNKNOWN_MSG_TYPE); }
@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(); }
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(); } }
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(); } IgniteMessageFactoryImpl(MessageFactory[] factories); }
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(); } IgniteMessageFactoryImpl(MessageFactory[] factories); @Override void register(short directType, Supplier<Message> supplier); @Override @Nullable Message create(short directType); short[] registeredDirectTypes(); }
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(); } IgniteMessageFactoryImpl(MessageFactory[] factories); @Override void register(short directType, Supplier<Message> supplier); @Override @Nullable Message create(short directType); short[] registeredDirectTypes();  }