blob: 7cfd2ef032ea95a60ef88d0d994654c07703c4ff [file] [log] [blame]
Yuta HIGUCHI4d0f89a2016-09-14 15:40:39 -07001/*
2 * Copyright 2016-present 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 */
16package org.onosproject.net.behaviour.protection;
17
18import javax.annotation.concurrent.Immutable;
19
20import org.onlab.util.Identifier;
21
22import com.google.common.annotations.Beta;
23
24/**
25 * Identifier for a transport entity endpoint.
26 * <p>
27 * Identifier will be assigned by the implementation of this Behaviour.
28 * It must be unique within the Device.
29 */
30@Beta
31@Immutable
32public class TransportEndpointId extends Identifier<String> {
33
34 /**
35 * Creates a {@link TransportEndpointId} from given String.
36 *
37 * @param id identifier expressed in String
38 * @return {@link TransportEndpointId}
39 */
40 public static TransportEndpointId of(String id) {
41 return new TransportEndpointId(id);
42 }
43
44 protected TransportEndpointId(String id) {
45 super(id);
46 }
47
48 /*
49 * Constructor for serialization.
50 */
51 protected TransportEndpointId() {
52 }
53}