blob: 8c41b4503e5b3a7729f48febb9a9f8960645d994 [file] [log] [blame]
Hyunsun Moondd14e8e2016-06-09 16:17:32 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Hyunsun Moondd14e8e2016-06-09 16:17:32 -07003 *
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;
17
18import org.onlab.packet.IpAddress;
19
20/**
21 * Static utility methods pertaining to {@link TunnelEndPoint} instances.
22 */
23public final class TunnelEndPoints {
24
25 private TunnelEndPoints() {
26 }
27
28 private static TunnelEndPoint<String> flowEndpoint = new TunnelEndPoint<>("flow");
29
30 /**
31 * Returns a tunnel endpoint with supplied IP address.
32 *
33 * @param ipAddress ip address
34 * @return tunnel endpoint instance
35 */
36 public static TunnelEndPoint<IpAddress> ipTunnelEndpoint(IpAddress ipAddress) {
37 return new TunnelEndPoint<>(ipAddress);
38 }
39
40 /**
41 * Returns a tunnel endpoint with FLOW keyword.
42 *
43 * @return tunnel endpoint instance
44 */
45 public static TunnelEndPoint<String> flowTunnelEndpoint() {
46 return flowEndpoint;
47 }
48}