2 * Copyright (c) 2016 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.netvirt.natservice.internal;
11 import org.opendaylight.netvirt.natservice.internal.NaptPacketInHandler.NatPacketProcessingState;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived;
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;
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;
31 this.protocol = protocol;
32 this.packetReceived = packetReceived;
33 this.pktProcessed = pktProcessed;
35 this.objectCreationTime = System.currentTimeMillis();
38 public PacketReceived getPacketReceived() {
39 return packetReceived;
42 public boolean isPktProcessed() {
46 public String getIpAddress() {
50 public int getPortNumber() {
54 public Long getRouterId() {
58 public Operation getOperation() {
62 public Protocol getProtocol() {
66 public long getObjectCreationTime() {
67 return objectCreationTime;
70 public NatPacketProcessingState getState() {
74 public enum Operation {
78 public enum Protocol {