3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.sal.action;
12 import javax.xml.bind.annotation.XmlAccessType;
13 import javax.xml.bind.annotation.XmlAccessorType;
14 import javax.xml.bind.annotation.XmlElement;
15 import javax.xml.bind.annotation.XmlRootElement;
17 import org.opendaylight.controller.sal.core.NodeConnector;
20 * Represents the action of sending the packet out of a physical port
26 @XmlAccessorType(XmlAccessType.NONE)
28 public class Output extends Action {
30 private NodeConnector port;
32 /* Dummy constructor for JAXB */
36 public Output(NodeConnector port) {
37 type = ActionType.OUTPUT;
42 public NodeConnector getPort() {
47 public boolean equals(Object obj) {
50 if (!super.equals(obj))
52 if (getClass() != obj.getClass())
54 Output other = (Output) obj;
56 if (other.port != null)
58 } else if (!port.equals(other.port))
64 public int hashCode() {
66 int result = super.hashCode();
67 result = prime * result + ((port == null) ? 0 : port.hashCode());
72 public String toString() {
73 return type + "[" + port.toString() + "]";