blob: 5938c821f2ec1ce673b81642654c37ac579870c3 [file] [log] [blame]
Shashikanth VH95bd85e2015-10-27 14:56:33 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Shashikanth VH95bd85e2015-10-27 14:56:33 +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.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 /**
Shashikanth VH44967ec2016-02-04 19:46:16 +053048 * Gets the builder object for a update message.
49 *
50 * @return builder object for update message
51 */
52 BgpUpdateMsg.Builder updateMessageBuilder();
53
54 /**
Shashikanth VH95bd85e2015-10-27 14:56:33 +053055 * Gets the BGP message reader.
56 *
57 * @return BGP message reader
58 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053059 BgpMessageReader<BgpMessage> getReader();
Shashikanth VH95bd85e2015-10-27 14:56:33 +053060
61 /**
62 * Returns BGP version.
63 *
64 * @return BGP version
65 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053066 BgpVersion getVersion();
Shashikanth VH95bd85e2015-10-27 14:56:33 +053067}