blob: cf6bf008be314ccf23fbaab5b45468d16610d5bb [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 */
24public interface BGPFactory {
25
26 /**
27 * Gets the builder object for a open message.
28 *
29 * @return builder object for open message
30 */
31 BGPOpenMsg.Builder openMessageBuilder();
32
33 /**
34 * Gets the builder object for a keepalive message.
35 *
36 * @return builder object for keepalive message
37 */
38 BGPKeepaliveMsg.Builder keepaliveMessageBuilder();
39
40 /**
41 * Gets the builder object for a notification message.
42 *
43 * @return builder object for notification message.
44 */
45 BGPNotificationMsg.Builder notificationMessageBuilder();
46
47 /**
48 * Gets the BGP message reader.
49 *
50 * @return BGP message reader
51 */
52 BGPMessageReader<BGPMessage> getReader();
53
54 /**
55 * Returns BGP version.
56 *
57 * @return BGP version
58 */
59 BGPVersion getVersion();
60}