use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820._record.route.subobjects.subobject.type.LabelCase in project bgpcep by opendaylight.
the class RROLabelSubobjectParser method serializeSubobject.
@Override
public void serializeSubobject(final Subobject subobject, final ByteBuf buffer) {
requireNonNull(subobject.getSubobjectType(), "Subobject type cannot be empty.");
final Label label = ((LabelCase) subobject.getSubobjectType()).getLabel();
final ByteBuf body = Unpooled.buffer();
this.registry.serializeLabel(label.getUniDirectional(), label.getGlobal(), label.getLabelType(), body);
RROSubobjectUtil.formatSubobject(TYPE, body, buffer);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820._record.route.subobjects.subobject.type.LabelCase in project bgpcep by opendaylight.
the class RROLabelSubobjectParser method serializeSubobject.
@Override
public void serializeSubobject(final SubobjectContainer subobject, final ByteBuf buffer) {
requireNonNull(subobject.getSubobjectType(), "Subobject type cannot be empty.");
final Label label = ((LabelCase) subobject.getSubobjectType()).getLabel();
final ByteBuf body = Unpooled.buffer();
this.registry.serializeLabel(label.getUniDirectional(), label.getGlobal(), label.getLabelType(), body);
RROSubobjectUtil.formatSubobject(TYPE, body, buffer);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820._record.route.subobjects.subobject.type.LabelCase in project bgpcep by opendaylight.
the class EROLabelSubobjectParser method serializeSubobject.
@Override
public void serializeSubobject(final SubobjectContainer subobject, final ByteBuf buffer) {
Preconditions.checkArgument(subobject.getSubobjectType() instanceof LabelCase, "Unknown subobject instance. Passed %s. Needed LabelCase.", subobject.getSubobjectType().getClass());
final Label label = ((LabelCase) subobject.getSubobjectType()).getLabel();
final ByteBuf body = Unpooled.buffer();
this.registry.serializeLabel(label.getUniDirectional(), false, label.getLabelType(), body);
EROSubobjectUtil.formatSubobject(TYPE, subobject.getLoose(), body, buffer);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820._record.route.subobjects.subobject.type.LabelCase in project bgpcep by opendaylight.
the class EROLabelSubobjectParser method serializeSubobject.
@Override
public void serializeSubobject(final Subobject subobject, final ByteBuf buffer) {
Preconditions.checkArgument(subobject.getSubobjectType() instanceof LabelCase, "Unknown subobject instance. Passed %s. Needed LabelCase.", subobject.getSubobjectType().getClass());
final Label label = ((LabelCase) subobject.getSubobjectType()).getLabel();
final ByteBuf body = Unpooled.buffer();
this.registry.serializeLabel(label.getUniDirectional(), false, label.getLabelType(), body);
EROSubobjectUtil.formatSubobject(TYPE, subobject.getLoose(), body, buffer);
}
Aggregations