Vidyashree Rama | e59ada1 | 2015-09-28 17:08:31 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Vidyashree Rama | e59ada1 | 2015-09-28 17:08:31 +0530 | [diff] [blame] | 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.bgpio.protocol; |
| 17 | |
| 18 | import org.jboss.netty.buffer.ChannelBuffer; |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 19 | import org.onosproject.bgpio.types.BgpHeader; |
Vidyashree Rama | e59ada1 | 2015-09-28 17:08:31 +0530 | [diff] [blame] | 20 | |
| 21 | /** |
| 22 | * Abstraction of an entity providing BGP Keepalive Message. |
| 23 | */ |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 24 | public interface BgpKeepaliveMsg extends BgpMessage { |
Vidyashree Rama | e59ada1 | 2015-09-28 17:08:31 +0530 | [diff] [blame] | 25 | |
| 26 | @Override |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 27 | BgpVersion getVersion(); |
Vidyashree Rama | e59ada1 | 2015-09-28 17:08:31 +0530 | [diff] [blame] | 28 | |
| 29 | @Override |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 30 | BgpType getType(); |
Vidyashree Rama | e59ada1 | 2015-09-28 17:08:31 +0530 | [diff] [blame] | 31 | |
| 32 | @Override |
| 33 | void writeTo(ChannelBuffer channelBuffer); |
| 34 | |
| 35 | @Override |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 36 | BgpHeader getHeader(); |
Vidyashree Rama | e59ada1 | 2015-09-28 17:08:31 +0530 | [diff] [blame] | 37 | |
| 38 | /** |
| 39 | * Builder interface with get and set functions to build Keepalive message. |
| 40 | */ |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 41 | interface Builder extends BgpMessage.Builder { |
Vidyashree Rama | e59ada1 | 2015-09-28 17:08:31 +0530 | [diff] [blame] | 42 | @Override |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 43 | BgpKeepaliveMsg build(); |
Vidyashree Rama | e59ada1 | 2015-09-28 17:08:31 +0530 | [diff] [blame] | 44 | |
| 45 | @Override |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 46 | Builder setHeader(BgpHeader bgpMsgHeader); |
Vidyashree Rama | e59ada1 | 2015-09-28 17:08:31 +0530 | [diff] [blame] | 47 | } |
| 48 | } |