blob: ede8c8a1766e51a10fe94b0ac72bb0bb8ec5d2f8 [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 */
16
17package org.onosproject.incubator.rpc;
18
19import com.google.common.annotations.Beta;
20
21// Implementation is expected to be a handler for RPC channel
22// and shim-layer to convert Java Service interface calls to/from RPC call
23/**
24 * Context for Remote service.
25 */
26@Beta
27public interface RemoteServiceContext {
28
29 // we may need a method to check connection state?
30
31 /**
32 * Returns implementation of the specified service class.
33 *
34 * @param serviceClass service class
35 * @param <T> type of service
36 * @return implementation class
37 * @throws UnsupportedOperationException if this context does not support it.
38 */
39 <T> T get(Class<T> serviceClass);
40}