blob: 12a58e41051771954cb27809c6e318288be4969d [file] [log] [blame]
Jian Li77d6e752017-01-29 23:24:18 +09001/*
2 * Copyright 2017-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.provider.lisp.mapping.util;
17
18import org.onosproject.lisp.msg.protocols.LispMapNotify;
19import org.onosproject.lisp.msg.protocols.LispMapReply;
20import org.onosproject.mapping.MappingEntry;
21import org.onosproject.net.DeviceId;
22import org.slf4j.Logger;
23import org.slf4j.LoggerFactory;
24
25/**
26 * Mapping entry builder class.
27 */
28public class MappingEntryBuilder {
29 private static final Logger log = LoggerFactory.getLogger(MappingEntryBuilder.class);
30
31 private final DeviceId deviceId;
32 private final LispMapReply mapReply;
33 private final LispMapNotify mapNotify;
34
35 /**
36 * Default constructor for MappingEntryBuilder.
37 *
38 * @param deviceId device identifier
39 * @param mapReply map reply message
40 */
41 public MappingEntryBuilder(DeviceId deviceId, LispMapReply mapReply) {
42 this.deviceId = deviceId;
43 this.mapReply = mapReply;
44 this.mapNotify = null;
45 }
46
47 /**
48 * Default constructor for MappingEntryBuilder.
49 *
50 * @param deviceId device identifier
51 * @param mapNotify map notify message
52 */
53 public MappingEntryBuilder(DeviceId deviceId, LispMapNotify mapNotify) {
54 this.deviceId = deviceId;
55 this.mapNotify = mapNotify;
56 this.mapReply = null;
57 }
58
59 public MappingEntry build() {
60 // TODO: provide a way to build mapping entry from input parameters
61 return null;
62 }
63}