Niraj Dubey | b7921b2 | 2021-09-07 15:21:42 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2021-present Open Networking Foundation |
| 3 | * |
| 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 | package org.onosproject.bgpmonitoring; |
| 17 | |
| 18 | import org.jboss.netty.buffer.ChannelBuffer; |
| 19 | import org.onlab.packet.bmp.Bmp; |
| 20 | |
| 21 | /** |
| 22 | * Abstraction of an entity providing BMP Message Reader. |
| 23 | */ |
| 24 | public interface BmpMessageReader<T> { |
| 25 | |
| 26 | /** |
| 27 | * Reads the Objects in the BMP Message and Returns BMP Message. |
| 28 | * |
| 29 | * @param cb Channel Buffer |
| 30 | * @param bmpHeader BMP message header |
| 31 | * @return BMP Message |
| 32 | * @throws BmpParseException on while parsing BMP message. |
| 33 | */ |
| 34 | T readFrom(ChannelBuffer cb, Bmp bmpHeader) throws BmpParseException; |
| 35 | } |