BUG-612 : switched PCEP message serializers to ByteBuf
[bgpcep.git] / pcep / impl / src / main / java / org / opendaylight / protocol / pcep / impl / object / PCEPBandwidthObjectParser.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.protocol.pcep.impl.object;
9
10 import io.netty.buffer.ByteBuf;
11
12 import org.opendaylight.protocol.pcep.spi.ObjectUtil;
13 import org.opendaylight.protocol.pcep.spi.TlvRegistry;
14
15 /**
16  * Parser for Bandwidth
17  */
18 public class PCEPBandwidthObjectParser extends AbstractBandwidthParser {
19
20     public static final int CLASS = 5;
21
22     public static final int TYPE = 1;
23
24     public PCEPBandwidthObjectParser(final TlvRegistry tlvReg) {
25         super(tlvReg);
26     }
27
28     @Override
29     protected void formatBandwidth(boolean processed, boolean ignored, ByteBuf body, ByteBuf buffer) {
30         ObjectUtil.formatSubobject(TYPE, CLASS, processed, ignored, body, buffer);
31     }
32 }