blob: c8e7bf99280bba43a425e88c0fdbab126bdfceaa [file] [log] [blame]
alessio0af65232020-09-19 17:06:37 +02001/*
2 * Copyright 2020-present Open Networking Foundation
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 * This work was partially supported by EC H2020 project METRO-HAUL (761727).
17 */
18
19package org.onosproject.net.behaviour;
20
21import org.onosproject.net.PortNumber;
22import org.onosproject.net.driver.HandlerBehaviour;
23
24import java.util.Set;
25
26/**
27 * Handler behaviour for retrieving internal connectivity information.
28 */
29public interface InternalConnectivity extends HandlerBehaviour {
30 /**
31 * Test if two ports of the device can be internally connected.
32 *
33 * @param inputPort in port of device
34 * @param outputPort out port of device
35 * @return true if inputPort can be connected outputPort
36 */
37 boolean testConnectivity(PortNumber inputPort, PortNumber outputPort);
38
39 /**
40 * Returns the set of output ports that can be connected to inputPort.
41 *
42 * @param inputPort in port of device
43 * @return list of output ports that can be connected to inputPort
44 */
45 Set<PortNumber> getOutputPorts(PortNumber inputPort);
46
47 /**
48 * Returns the set of input ports that can be connected to outputPort.
49 *
50 * @param outputPort out port of device
51 * @return list of input ports that can be connected to outputPort
52 */
53 Set<PortNumber> getInputPorts(PortNumber outputPort);
54}