blob: f7adb04c801e85f337b7b0c4e1869860e1ae72ff [file] [log] [blame]
Jonathan Hart06e89082016-08-08 17:21:01 -07001/*
2 * Copyright 2016-present 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.incubator.net.neighbour;
18
19import com.google.common.annotations.Beta;
20import org.onosproject.incubator.net.intf.Interface;
21import org.onosproject.net.ConnectPoint;
22
23/**
24 * Provides a means of registering logic for handling neighbour messages.
25 */
26@Beta
27public interface NeighbourResolutionService {
28
29 /**
30 * Registers a neighbour message handler for all neighbour messages
31 * incoming on the given connect point.
32 *
33 * @param connectPoint connect point
34 * @param handler neighbour message handler
35 */
36 void registerNeighbourHandler(ConnectPoint connectPoint, NeighbourMessageHandler handler);
37
38 /**
39 * Registers a neighbour message handler for all neighbour messages incoming
40 * on the given interface. Neighbour packets must match the fields of the
41 * interface in order to be handled by this message handler.
42 *
43 * @param intf interface
44 * @param handler neighbour message handler
45 */
46 void registerNeighbourHandler(Interface intf, NeighbourMessageHandler handler);
47
48}