blob: 3092ae0b55ee39488bfcec0dc1d4972cb4c780f6 [file] [log] [blame]
Jonathan Hart41349e92015-02-09 14:14:02 -08001/*
Jonathan Hartf4bd0482017-01-27 15:11:18 -08002 * Copyright 2017-present Open Networking Laboratory
Jonathan Hart41349e92015-02-09 14:14:02 -08003 *
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 */
Jonathan Hart3930f632015-10-19 12:12:51 -070016
17package org.onosproject.routing.fpm;
18
19import org.onosproject.routing.fpm.protocol.FpmHeader;
Jonathan Hart41349e92015-02-09 14:14:02 -080020
21/**
Jonathan Hart6b045582016-02-03 10:00:08 -080022 * Listener for events from the route source.
Jonathan Hart41349e92015-02-09 14:14:02 -080023 */
Jonathan Hart6b045582016-02-03 10:00:08 -080024public interface FpmListener {
Jonathan Hart41349e92015-02-09 14:14:02 -080025
26 /**
Jonathan Hart3930f632015-10-19 12:12:51 -070027 * Handles an FPM message.
Jonathan Hart41349e92015-02-09 14:14:02 -080028 *
Jonathan Hartb10f1e72017-05-02 16:36:26 -070029 * @param peer FPM peer
Jonathan Hart3930f632015-10-19 12:12:51 -070030 * @param fpmMessage FPM message
Jonathan Hart41349e92015-02-09 14:14:02 -080031 */
Jonathan Hartb10f1e72017-05-02 16:36:26 -070032 void fpmMessage(FpmPeer peer, FpmHeader fpmMessage);
Jonathan Hart6b045582016-02-03 10:00:08 -080033
34 /**
35 * Signifies that a new peer has attempted to initiate an FPM connection.
36 *
Jonathan Hartb10f1e72017-05-02 16:36:26 -070037 * @param peer FPM peer
Jonathan Hart6b045582016-02-03 10:00:08 -080038 * @return true if the connection should be admitted, otherwise false
39 */
Jonathan Hartb10f1e72017-05-02 16:36:26 -070040 boolean peerConnected(FpmPeer peer);
Jonathan Hart6b045582016-02-03 10:00:08 -080041
42 /**
43 * Signifies that an FPM connection has been disconnected.
44 *
Jonathan Hartb10f1e72017-05-02 16:36:26 -070045 * @param peer FPM peer
Jonathan Hart6b045582016-02-03 10:00:08 -080046 */
Jonathan Hartb10f1e72017-05-02 16:36:26 -070047 void peerDisconnected(FpmPeer peer);
Jonathan Hart41349e92015-02-09 14:14:02 -080048}