use of org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl in project openflowplugin by opendaylight.
the class OF10PacketOutInputMessageFactoryTest method startUp.
/**
* Initializes serializer registry and stores correct factory in field.
*/
@Before
public void startUp() {
registry = new SerializerRegistryImpl();
registry.init();
packetOutFactory = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF10_VERSION_ID, PacketOutInput.class));
}
use of org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl in project openflowplugin by opendaylight.
the class OF10PortStatusMessageFactoryTest method startUp.
@Before
public void startUp() {
SerializerRegistry registry = new SerializerRegistryImpl();
registry.init();
factory = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF10_VERSION_ID, PortStatusMessage.class));
}
use of org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl in project openflowplugin by opendaylight.
the class PacketOutInputMessageFactoryTest method startUp.
/**
* Initializes serializer registry and stores correct factory in field.
*/
@Before
public void startUp() {
registry = new SerializerRegistryImpl();
registry.init();
packetOutFactory = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF13_VERSION_ID, PacketOutInput.class));
}
use of org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl in project openflowplugin by opendaylight.
the class EchoReplyInputMessageFactoryTest method startUp.
/**
* Initializes serializer registry and stores correct factory in field.
*/
@Before
public void startUp() {
registry = new SerializerRegistryImpl();
registry.init();
echoFactory = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF13_VERSION_ID, EchoReplyInput.class));
}
use of org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl in project openflowplugin by opendaylight.
the class GetAsyncReplyMessageFactoryTest method testSetAsyncInputWithNullMasks.
@Test
public void testSetAsyncInputWithNullMasks() throws Exception {
GetAsyncOutputBuilder builder = new GetAsyncOutputBuilder();
BufferHelper.setupHeader(builder, EncodeConstants.OF13_VERSION_ID);
builder.setPacketInMask(null);
builder.setPortStatusMask(null);
builder.setFlowRemovedMask(null);
GetAsyncOutput message = builder.build();
GetAsyncReplyMessageFactory serializer = new GetAsyncReplyMessageFactory();
SerializerRegistry registry = new SerializerRegistryImpl();
registry.init();
ByteBuf serializedBuffer = UnpooledByteBufAllocator.DEFAULT.buffer();
serializer.serialize(message, serializedBuffer);
BufferHelper.checkHeaderV13(serializedBuffer, MESSAGE_TYPE, 8);
Assert.assertTrue("Unexpected data", serializedBuffer.readableBytes() == 0);
}
Aggregations