Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 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 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.net.host; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 17 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 18 | import org.onosproject.net.HostId; |
| 19 | import org.onosproject.net.provider.ProviderService; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 20 | |
| 21 | /** |
| 22 | * Means of conveying host information to the core. |
| 23 | */ |
tom | d735672 | 2014-08-26 01:07:39 -0700 | [diff] [blame] | 24 | public interface HostProviderService extends ProviderService<HostProvider> { |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 25 | |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 26 | /** |
| 27 | * Notifies the core when a host has been detected on a network along with |
Kedar Gupta | 47bd480 | 2015-07-15 09:43:26 -0700 | [diff] [blame] | 28 | * information that identifies the host location. |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 29 | * |
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame] | 30 | * @param hostId id of the host that been detected |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 31 | * @param hostDescription description of host and its location |
| 32 | */ |
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame] | 33 | void hostDetected(HostId hostId, HostDescription hostDescription); |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 34 | |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 35 | /** |
| 36 | * Notifies the core when a host is no longer detected on a network. |
| 37 | * |
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame] | 38 | * @param hostId id of the host that vanished |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 39 | */ |
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame] | 40 | void hostVanished(HostId hostId); |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 41 | |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 42 | } |