Remove redundant names in paths
[netvirt.git] / natservice / impl / src / main / java / org / opendaylight / netvirt / natservice / internal / NAPTEntryEvent.java
1 /*
2  * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  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
9 package org.opendaylight.netvirt.natservice.internal;
10
11 import org.opendaylight.netvirt.natservice.internal.NaptPacketInHandler.NatPacketProcessingState;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived;
13
14 public class NAPTEntryEvent {
15     private final String ipAddress;
16     private final int portNumber;
17     private final Long routerId;
18     private final Operation op;
19     private final Protocol protocol;
20     private final PacketReceived packetReceived;
21     private final boolean pktProcessed;
22     private final long objectCreationTime;
23     private final NatPacketProcessingState state;
24
25     NAPTEntryEvent(String ipAddress, int portNumber, Long routerId, Operation op, Protocol protocol,
26             PacketReceived packetReceived, boolean pktProcessed, NatPacketProcessingState state) {
27         this.ipAddress = ipAddress;
28         this.portNumber = portNumber;
29         this.routerId = routerId;
30         this.op = op;
31         this.protocol = protocol;
32         this.packetReceived = packetReceived;
33         this.pktProcessed = pktProcessed;
34         this.state = state;
35         this.objectCreationTime = System.currentTimeMillis();
36     }
37
38     public PacketReceived getPacketReceived() {
39         return packetReceived;
40     }
41
42     public boolean isPktProcessed() {
43         return pktProcessed;
44     }
45
46     public String getIpAddress() {
47         return ipAddress;
48     }
49
50     public int getPortNumber() {
51         return portNumber;
52     }
53
54     public Long getRouterId() {
55         return routerId;
56     }
57
58     public Operation getOperation() {
59         return op;
60     }
61
62     public Protocol getProtocol() {
63         return protocol;
64     }
65
66     public long getObjectCreationTime() {
67         return objectCreationTime;
68     }
69
70     public NatPacketProcessingState getState() {
71         return state;
72     }
73
74     public enum Operation {
75         ADD, DELETE
76     }
77
78     public enum Protocol {
79         TCP, UDP
80     }
81 }