use of org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey in project openflowplugin by opendaylight.
the class MultipartReplyMessageDeserializer method deserialize.
@Override
public MultipartReply deserialize(ByteBuf message) {
final long xid = message.readUnsignedInt();
final int type = message.readUnsignedShort();
final boolean reqMore = (message.readUnsignedShort() & 0x01) != 0;
message.skipBytes(PADDING_IN_MULTIPART_REPLY_HEADER);
final OFDeserializer<MultipartReplyBody> deserializer = Preconditions.checkNotNull(registry).getDeserializer(new MessageCodeKey(EncodeConstants.OF13_VERSION_ID, type, MultipartReplyBody.class));
return new MultipartReplyBuilder().setVersion((short) EncodeConstants.OF13_VERSION_ID).setXid(xid).setRequestMore(reqMore).setMultipartReplyBody(deserializer.deserialize(message)).build();
}
use of org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey in project openflowplugin by opendaylight.
the class MultipartReplyMessageFactoryTest method startUp.
/**
* Initializes deserializer registry and lookups correct deserializer.
*/
@Before
public void startUp() {
DeserializerRegistry registry = new DeserializerRegistryImpl();
registry.init();
multipartFactory = registry.getDeserializer(new MessageCodeKey(EncodeConstants.OF13_VERSION_ID, 19, MultipartReplyMessage.class));
}
use of org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey in project openflowplugin by opendaylight.
the class MultipartRequestQueueInputMessageFactoryTest method startUp.
@Before
public void startUp() {
DeserializerRegistry desRegistry = new DeserializerRegistryImpl();
desRegistry.init();
factory = desRegistry.getDeserializer(new MessageCodeKey(EncodeConstants.OF13_VERSION_ID, 18, MultipartRequestInput.class));
}
use of org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey in project openflowplugin by opendaylight.
the class MultipartRequestTableInputMessageFactoryTest method startUp.
@Before
public void startUp() {
DeserializerRegistry desRegistry = new DeserializerRegistryImpl();
desRegistry.init();
factory = desRegistry.getDeserializer(new MessageCodeKey(EncodeConstants.OF13_VERSION_ID, 18, MultipartRequestInput.class));
}
use of org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey in project openflowplugin by opendaylight.
the class OF10FlowModInputMessageFactoryTest method startUp.
@Before
public void startUp() {
DeserializerRegistry desRegistry = new DeserializerRegistryImpl();
desRegistry.init();
factory = desRegistry.getDeserializer(new MessageCodeKey(EncodeConstants.OF10_VERSION_ID, 14, FlowModInput.class));
}
Aggregations