blob: 74732eae721608593bc358a373db38b35f2fe799 [file] [log] [blame]
Thomas Vachuska05453c92015-09-09 14:40:49 -07001/*
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 */
16package org.onosproject.provider.lldp.impl;
17
18import org.onosproject.mastership.MastershipService;
Thomas Vachuskae4ebac92015-09-10 11:39:05 -070019import org.onosproject.net.LinkKey;
Ayaka Koshibe3ddb7b22015-12-10 17:32:59 -080020import org.onosproject.net.device.DeviceService;
Thomas Vachuska05453c92015-09-09 14:40:49 -070021import org.onosproject.net.link.LinkProviderService;
22import org.onosproject.net.packet.PacketService;
23
24/**
25 * Shared context for use by link discovery.
26 */
Thomas Vachuskae4ebac92015-09-10 11:39:05 -070027interface DiscoveryContext {
Thomas Vachuska05453c92015-09-09 14:40:49 -070028
29 /**
30 * Returns the shared mastership service reference.
31 *
32 * @return mastership service
33 */
34 MastershipService mastershipService();
35
36 /**
37 * Returns the shared link provider service reference.
38 *
39 * @return link provider service
40 */
41 LinkProviderService providerService();
42
43 /**
44 * Returns the shared packet service reference.
45 *
46 * @return packet service
47 */
48 PacketService packetService();
49
50 /**
Ayaka Koshibe3ddb7b22015-12-10 17:32:59 -080051 * Returns the DeviceService reference.
52 *
53 * @return the device service interface
54 */
55 DeviceService deviceService();
56
57 /**
Thomas Vachuska05453c92015-09-09 14:40:49 -070058 * Returns the probe rate in millis.
59 *
60 * @return probe rate
61 */
62 long probeRate();
63
64 /**
Thomas Vachuska05453c92015-09-09 14:40:49 -070065 * Indicates whether to emit BDDP.
66 *
67 * @return true to emit BDDP
68 */
Jonathan Hartb35540a2015-11-17 09:30:56 -080069 boolean useBddp();
Thomas Vachuskae4ebac92015-09-10 11:39:05 -070070
71 /**
72 * Touches the link identified by the given key to indicate that it's active.
73 *
74 * @param key link key
75 */
76 void touchLink(LinkKey key);
Ayaka Koshibe12c8c082015-12-08 12:48:46 -080077
78 /**
79 * Returns the cluster-wide unique identifier.
80 *
81 * @return the cluster identifier
82 */
83 String fingerprint();
Thomas Vachuska05453c92015-09-09 14:40:49 -070084}