Migrate lisp-proto implementation to IETF YANG model
[lispflowmapping.git] / mappingservice / lisp-proto / src / main / java / org / opendaylight / lispflowmapping / lisp / serializer / address / LispAddressSerializerContext.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.lispflowmapping.lisp.serializer.address;
9
10 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.InstanceIdType;
11
12 /**
13  * @author Lorand Jakab
14  *
15  */
16 public class LispAddressSerializerContext {
17     public static final short MASK_LEN_MISSING = -1;
18     private InstanceIdType vni;
19     private short maskLen;
20
21     public LispAddressSerializerContext(InstanceIdType vni) {
22         this(vni, MASK_LEN_MISSING);
23     }
24
25     public LispAddressSerializerContext(short maskLen) {
26         this(null, maskLen);
27     }
28
29     public LispAddressSerializerContext(InstanceIdType vni, short maskLength) {
30         this.vni = vni;
31         this.maskLen = maskLength;
32     }
33
34     InstanceIdType getVni() {
35         return vni;
36     }
37
38     void setVni(InstanceIdType vni) {
39         this.vni = vni;
40     }
41
42     short getMaskLen() {
43         return maskLen;
44     }
45
46     void setMaskLen(short maskLen) {
47         this.maskLen = maskLen;
48     }
49 }