blob: a40a8378c99126943b9052bbbcded09ec96f0c2b [file] [log] [blame]
HIGUCHI Yuta279b8d12015-11-04 10:58:06 -08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
HIGUCHI Yuta279b8d12015-11-04 10:58:06 -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 */
16package org.onosproject.incubator.rpc;
17
18import java.net.URI;
19
20import com.google.common.annotations.Beta;
21
22// This is actually the RPC Service, where consumers get
23// RemoteSericeContext (~= RPC Session) for given URI
24// expected to be implemented by some Manager class on Lower-side ONOS
25/**
26 * Service for retrieving RPC session handler ({@link RemoteServiceContext}).
27 */
28@Beta
29public interface RemoteServiceDirectory {
30
31 /**
32 * Returns remote service context.
33 *
34 * @param uri URI representing remote end point. e.g., (grpc://hostname:port)
35 * @return remote service context
36 * @throws UnsupportedOperationException if URI scheme was not supported.
37 */
38 RemoteServiceContext get(URI uri);
39
40}