blob: 3bc180ced92ad7e4e595b5cff26169659e10af69 [file] [log] [blame]
Jordan Haltermand04e3442018-07-02 17:40:07 -07001/*
2 * Copyright 2018-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 */
16package org.onosproject.mastership;
17
18import org.onosproject.net.DeviceId;
19
20/**
21 * Mastership-based proxy factory.
22 * <p>
23 * The mastership-based proxy factory constructs proxy instances for the master node of a given {@link DeviceId}.
24 * When a proxy method is invoked, the method will be called on the master node for the device.
25 */
26public interface MastershipProxyFactory<T> {
27
28 /**
29 * Returns the proxy for the given device.
30 *
31 * @param deviceId the device identifier
32 * @return the proxy for the given device
33 */
34 T getProxyFor(DeviceId deviceId);
35
36}