blob: ff516d71acf8a04dcc9a551658335dea4a1a8d95 [file] [log] [blame]
Jonathan Hartbbc352f2015-10-27 19:24:36 -07001/*
2 * Copyright 2015 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 */
16
17package org.onosproject.virtualbng;
18
19import org.onosproject.net.ConnectPoint;
20
21/**
22 * Configuration for a connect point.
23 */
24public class ConnectPointConfiguration {
25
26 private ConnectPoint connectPoint;
27
28 /**
29 * Creats a new connect point from a string representation.
30 *
31 * @param string connect point string
32 */
33 public ConnectPointConfiguration(String string) {
34 connectPoint = ConnectPoint.deviceConnectPoint(string);
35 }
36
37 /**
38 * Creates a new connect point from a string representation.
39 *
40 * @param string connect point string
41 * @return new connect point configuration
42 */
43 public static ConnectPointConfiguration of(String string) {
44 return new ConnectPointConfiguration(string);
45 }
46
47 /**
48 * Gets the connect point.
49 *
50 * @return connect point
51 */
52 public ConnectPoint connectPoint() {
53 return connectPoint;
54 }
55}