Search in sources :

Example 1 with BundlePropertyBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.bundle.common.grouping.BundlePropertyBuilder in project openflowplugin by opendaylight.

the class BundleControlFactory method createExperimenterBundleProperty.

// FB doesn't recognize Objects.requireNonNull
@SuppressFBWarnings("UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
private BundleProperty createExperimenterBundleProperty(final int length, final ByteBuf message) {
    Objects.requireNonNull(deserializerRegistry);
    BundlePropertyExperimenterBuilder experimenterProperty = new BundlePropertyExperimenterBuilder();
    long experimenterId = message.readUnsignedInt();
    long expType = message.readUnsignedInt();
    experimenterProperty.setExperimenter(new ExperimenterId(experimenterId));
    experimenterProperty.setExpType(expType);
    OFDeserializer<BundlePropertyExperimenterData> deserializer = deserializerRegistry.getDeserializer(new ExperimenterIdTypeDeserializerKey(EncodeConstants.OF13_VERSION_ID, experimenterId, expType, BundlePropertyExperimenterData.class));
    experimenterProperty.setBundlePropertyExperimenterData(deserializer.deserialize(message.readBytes(length - 12)));
    return new BundlePropertyBuilder().setType(BundlePropertyType.ONFETBPTEXPERIMENTER).setBundlePropertyEntry(experimenterProperty.build()).build();
}
Also used : BundlePropertyBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.bundle.common.grouping.BundlePropertyBuilder) BundlePropertyExperimenterData(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.bundle.property.grouping.bundle.property.entry.bundle.property.experimenter.BundlePropertyExperimenterData) BundlePropertyExperimenterBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.bundle.property.grouping.bundle.property.entry.BundlePropertyExperimenterBuilder) ExperimenterIdTypeDeserializerKey(org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdTypeDeserializerKey) ExperimenterId(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings)

Aggregations

SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)1 ExperimenterIdTypeDeserializerKey (org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdTypeDeserializerKey)1 ExperimenterId (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId)1 BundlePropertyBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.bundle.common.grouping.BundlePropertyBuilder)1 BundlePropertyExperimenterBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.bundle.property.grouping.bundle.property.entry.BundlePropertyExperimenterBuilder)1 BundlePropertyExperimenterData (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.bundle.property.grouping.bundle.property.entry.bundle.property.experimenter.BundlePropertyExperimenterData)1