blob: b869aebad7068ecec8335317179a7edbf099378d [file] [log] [blame]
Brian Stanke2b4f32d2016-02-03 14:22:10 -05001/*
2 * Copyright 2016 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.key;
18
19import com.google.common.annotations.Beta;
Brian Stankeca93d9a2016-02-10 09:17:35 -050020import org.onosproject.event.ListenerService;
21
22import java.util.Collection;
Brian Stanke2b4f32d2016-02-03 14:22:10 -050023
24/**
25 * Service for querying device keys.
26 */
27@Beta
Brian Stankeca93d9a2016-02-10 09:17:35 -050028public interface DeviceKeyService extends ListenerService<DeviceKeyEvent, DeviceKeyListener> {
Brian Stanke2b4f32d2016-02-03 14:22:10 -050029
30 /**
31 * Returns all device keys.
32 *
Brian Stankeca93d9a2016-02-10 09:17:35 -050033 * @return Collection of device keys
Brian Stanke2b4f32d2016-02-03 14:22:10 -050034 */
Brian Stankeca93d9a2016-02-10 09:17:35 -050035 Collection<DeviceKey> getDeviceKeys();
Brian Stanke2b4f32d2016-02-03 14:22:10 -050036
37 /**
Brian Stankeca93d9a2016-02-10 09:17:35 -050038 * Returns the device key using a device key identifier.
Brian Stanke2b4f32d2016-02-03 14:22:10 -050039 *
Brian Stankeca93d9a2016-02-10 09:17:35 -050040 * @param deviceKeyId device key identifier
41 * @return device key
Brian Stanke2b4f32d2016-02-03 14:22:10 -050042 */
Brian Stankeca93d9a2016-02-10 09:17:35 -050043 DeviceKey getDeviceKey(DeviceKeyId deviceKeyId);
Brian Stanke2b4f32d2016-02-03 14:22:10 -050044}
45