Initial code drop
[bgpcep.git] / bgp / parser-api / src / main / java / org / opendaylight / protocol / bgp / parser / parameter / CapabilityParameter.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.bgp.parser.parameter;
9
10 import org.opendaylight.protocol.bgp.parser.BGPParameter;
11
12 /**
13  * Capability parameter superclass.
14  * 
15  * @see <a href="http://tools.ietf.org/html/rfc3392#section-4">Capabilities Optional Parameter</a>
16  */
17 public abstract class CapabilityParameter implements BGPParameter {
18
19         private final int TYPE = 2;
20
21         private final int code;
22
23         CapabilityParameter(final int code) {
24                 this.code = code;
25         }
26
27         /**
28          * Returns capability code specific capability parameter.
29          * 
30          * @return capability code
31          */
32         public int getCode() {
33                 return this.code;
34         }
35
36         @Override
37         public int getType() {
38                 return this.TYPE;
39         }
40 }