2 * Copyright (c) 2013 Cisco Systems, Inc. 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.controller.sal.action;
11 import javax.xml.bind.annotation.XmlAccessType;
12 import javax.xml.bind.annotation.XmlAccessorType;
13 import javax.xml.bind.annotation.XmlElement;
14 import javax.xml.bind.annotation.XmlRootElement;
16 import org.opendaylight.controller.sal.core.NodeConnector;
19 * Represents the action of sending the packet out of a physical port
22 @XmlAccessorType(XmlAccessType.NONE)
23 public class Output extends Action {
24 private static final long serialVersionUID = 1L;
26 private NodeConnector port;
28 /* Dummy constructor for JAXB */
29 @SuppressWarnings("unused")
33 public Output(NodeConnector port) {
34 type = ActionType.OUTPUT;
39 public NodeConnector getPort() {
44 public boolean equals(Object obj) {
48 if (!super.equals(obj)) {
51 if (getClass() != obj.getClass()) {
54 Output other = (Output) obj;
56 if (other.port != null) {
59 } else if (!port.equals(other.port)) {
66 public int hashCode() {
68 int result = super.hashCode();
69 result = prime * result + ((port == null) ? 0 : port.hashCode());
74 public String toString() {
75 return type + "[" + port.toString() + "]";