blob: 32aaa71c1ee7ae196a7f740b6a23a38903668f6d [file] [log] [blame]
Satish Ke107e662015-09-21 19:00:17 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Satish Ke107e662015-09-21 19:00:17 +05303 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.bgpio.types;
18
19import org.jboss.netty.buffer.ChannelBuffer;
20
21/**
22 * Abstraction which Provides the BGP of TLV format.
23 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053024public interface BgpValueType {
Satish Ke107e662015-09-21 19:00:17 +053025 /**
26 * Returns the Type of BGP Message.
27 *
28 * @return short value of type
29 */
30 short getType();
31
32 /**
33 * Writes the byte Stream of BGP Message to channel buffer.
34 *
35 * @param cb channel buffer
36 * @return length written to channel buffer
37 */
38 int write(ChannelBuffer cb);
Priyanka B02040732015-11-29 11:30:29 +053039
40 /**
41 * Compares two objects.
42 *
43 * @param o object
44 * @return result after comparing two objects
45 */
46 int compareTo(Object o);
mohamedrahil00f6f262016-11-24 20:20:41 +053047}