blob: 29ea15bbd397b6316cdd9d678213a8748d28c8ee [file] [log] [blame]
Thomas Vachuska84922b32016-02-18 13:52:11 -08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Thomas Vachuska84922b32016-02-18 13:52:11 -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 */
16
17package org.onosproject.net.device;
18
19import org.onosproject.net.driver.HandlerBehaviour;
20
21import java.util.List;
22
23/**
24 * Handler behaviour capable of creating device and port descriptions.
25 * These descriptions should be appropriately annotated to support downstream
26 * projections of the respective devices and their ports.
27 */
28public interface DeviceDescriptionDiscovery extends HandlerBehaviour {
29
30 /**
Andrea Campanella6c71a052016-04-22 11:56:31 -070031 * Returns a device description appropriately annotated to support
Thomas Vachuska84922b32016-02-18 13:52:11 -080032 * downstream model extension via projections of the resulting device,
33 * as in the following example.
34 * <pre>
35 * MicrowaveDevice device = deviceService.get(id).as(MicrowaveDevice.class);
36 * </pre>
37 *
38 * @return annotated device description
39 */
40 DeviceDescription discoverDeviceDetails();
41
42 /**
Andrea Campanella6c71a052016-04-22 11:56:31 -070043 * Returns a list of port descriptions appropriately annotated to support
Thomas Vachuska84922b32016-02-18 13:52:11 -080044 * downstream model extension via projections of their parent device,
45 * as in the following example.
46 * <pre>
47 * MicrowaveDevice device = deviceService.get(id).as(MicrowaveDevice.class);
48 * List&lt;MicrowavePort&gt; ports = device.microwavePorts(deviceService.getPorts(id));
49 * </pre>
50 *
51 * @return annotated device description
52 */
53 List<PortDescription> discoverPortDetails();
54
55}