2 * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.bgpmanager.thrift.client.globals;
14 private int prefixlen;
17 private String prefix;
18 private String nexthop;
20 public Route(String rd, String prefix, int prefixlen, String nexthop, int label) {
23 this.prefixlen = prefixlen;
24 this.nexthop = nexthop;
28 public String getRd() {
32 public String getPrefix() {
33 return new StringBuilder().append(this.prefix).append("/").append(this.prefixlen).toString();
36 public String getNexthop() {
40 public int getLabel() {
44 public void setRd(String rd) {
48 public void setPrefix(String prefix) {
49 String[] splitStr = prefix.split("/");
50 this.prefix = splitStr[0];
51 this.prefixlen = Integer.parseInt(splitStr[1]);
54 public void setNexthop(String nextHop) {
55 this.nexthop = nextHop;
58 public void setLabel(int label) {