blob: 11a85ff859f5240d1db19cc8eef25d37bbff4d0b [file] [log] [blame]
Shashikanth VH95bd85e2015-10-27 14:56:33 +05301/*
2 * Copyright 2015 Open Networking Laboratory
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
17package org.onosproject.bgpio.protocol;
18
19/**
20 * Abstraction of an message factory providing builder functions to BGP messages
21 * and objects.
22 *
23 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053024public interface BgpFactory {
Shashikanth VH95bd85e2015-10-27 14:56:33 +053025
26 /**
27 * Gets the builder object for a open message.
28 *
29 * @return builder object for open message
30 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053031 BgpOpenMsg.Builder openMessageBuilder();
Shashikanth VH95bd85e2015-10-27 14:56:33 +053032
33 /**
34 * Gets the builder object for a keepalive message.
35 *
36 * @return builder object for keepalive message
37 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053038 BgpKeepaliveMsg.Builder keepaliveMessageBuilder();
Shashikanth VH95bd85e2015-10-27 14:56:33 +053039
40 /**
41 * Gets the builder object for a notification message.
42 *
43 * @return builder object for notification message.
44 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053045 BgpNotificationMsg.Builder notificationMessageBuilder();
Shashikanth VH95bd85e2015-10-27 14:56:33 +053046
47 /**
48 * Gets the BGP message reader.
49 *
50 * @return BGP message reader
51 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053052 BgpMessageReader<BgpMessage> getReader();
Shashikanth VH95bd85e2015-10-27 14:56:33 +053053
54 /**
55 * Returns BGP version.
56 *
57 * @return BGP version
58 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053059 BgpVersion getVersion();
Shashikanth VH95bd85e2015-10-27 14:56:33 +053060}