use of org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry in project openflowplugin by opendaylight.
the class OF10FeaturesReplyMessageFactoryTest method startUp.
@Before
public void startUp() {
SerializerRegistry registry = new SerializerRegistryImpl();
registry.init();
factory = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF10_VERSION_ID, GetFeaturesOutput.class));
}
use of org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry in project openflowplugin by opendaylight.
the class OF10FlowRemovedMessageFactoryTest method startUp.
@Before
public void startUp() {
SerializerRegistry registry = new SerializerRegistryImpl();
registry.init();
factory = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF10_VERSION_ID, FlowRemovedMessage.class));
}
use of org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry in project openflowplugin by opendaylight.
the class OF10PacketInMessageFactoryTest method startUp.
@Before
public void startUp() {
SerializerRegistry registry = new SerializerRegistryImpl();
registry.init();
factory = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF10_VERSION_ID, PacketInMessage.class));
}
use of org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry in project openflowplugin by opendaylight.
the class QueueGetConfigReplyMessageFactoryTest method startUp.
@Before
public void startUp() {
SerializerRegistry registry = new SerializerRegistryImpl();
registry.init();
factory = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF13_VERSION_ID, GetQueueConfigOutput.class));
}
use of org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry in project openflowplugin by opendaylight.
the class SerializationFactoryTest method testNotExistingSerializer.
/**
* Test serializer not found scenario.
*/
@Test(expected = IllegalStateException.class)
public void testNotExistingSerializer() {
SerializerRegistry registry = new SerializerRegistryImpl();
registry.init();
final SerializationFactory factory = new SerializationFactory(registry);
final ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
HelloInputBuilder helloBuilder = new HelloInputBuilder();
helloBuilder.setVersion((short) EncodeConstants.OF10_VERSION_ID);
helloBuilder.setXid(123456L);
helloBuilder.setElements(null);
factory.messageToBuffer((short) 0, buffer, helloBuilder.build());
}
Aggregations