blob: 6db331ab2d261a8b9c49771d7efc4c3a0ea7b014 [file] [log] [blame]
Andrea Campanella378e21a2017-06-07 12:09:59 +02001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Andrea Campanella378e21a2017-06-07 12:09:59 +02003 *
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.grpc.api;
18
19import com.google.common.annotations.Beta;
20import org.onlab.util.Identifier;
Andrea Campanella378e21a2017-06-07 12:09:59 +020021
22/**
Carmelo Cascone73f45302019-02-04 23:11:26 -080023 * gRPC channel identifier, unique in the scope of an ONOS node.
Andrea Campanella378e21a2017-06-07 12:09:59 +020024 */
25@Beta
26public final class GrpcChannelId extends Identifier<String> {
27
Carmelo Cascone73f45302019-02-04 23:11:26 -080028 private GrpcChannelId(String channelName) {
29 super(channelName);
Andrea Campanella378e21a2017-06-07 12:09:59 +020030 }
31
32 /**
Carmelo Cascone73f45302019-02-04 23:11:26 -080033 * Instantiates a new channel ID.
Andrea Campanella378e21a2017-06-07 12:09:59 +020034 *
Andrea Campanella378e21a2017-06-07 12:09:59 +020035 * @param channelName name of the channel
Carmelo Cascone47a853b2018-01-05 02:40:58 +010036 * @return channel ID
Andrea Campanella378e21a2017-06-07 12:09:59 +020037 */
Carmelo Cascone73f45302019-02-04 23:11:26 -080038 public static GrpcChannelId of(String channelName) {
39 return new GrpcChannelId(channelName);
Andrea Campanella378e21a2017-06-07 12:09:59 +020040 }
41}