X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=third-party%2Fopenflowj%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenflow%2Fprotocol%2Faction%2FOFActionOutput.java;fp=third-party%2Fopenflowj%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenflow%2Fprotocol%2Faction%2FOFActionOutput.java;h=0000000000000000000000000000000000000000;hb=e1c04c5af263a9604a765f1ab98be51dfc51d8cb;hp=95208cde7911411b228c2e3fed78b1268ad2c171;hpb=a935ffda7f26be29de879a47b426d0db7a28d588;p=controller.git diff --git a/third-party/openflowj/src/main/java/org/openflow/protocol/action/OFActionOutput.java b/third-party/openflowj/src/main/java/org/openflow/protocol/action/OFActionOutput.java deleted file mode 100644 index 95208cde79..0000000000 --- a/third-party/openflowj/src/main/java/org/openflow/protocol/action/OFActionOutput.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * @author David Erickson (daviderickson@cs.stanford.edu) - Mar 11, 2010 - */ -package org.openflow.protocol.action; - -import java.nio.ByteBuffer; - -import org.openflow.util.U16; - -/** - * @author David Erickson (daviderickson@cs.stanford.edu) - Mar 11, 2010 - * @author Rob Sherwood (rob.sherwood@stanford.edu) - */ -public class OFActionOutput extends OFAction implements Cloneable { - public static int MINIMUM_LENGTH = 8; - - protected short port; - protected short maxLength; - - public OFActionOutput() { - super.setType(OFActionType.OUTPUT); - super.setLength((short) MINIMUM_LENGTH); - } - - public OFActionOutput(short port, short maxLength) { - super(); - super.setType(OFActionType.OUTPUT); - super.setLength((short) MINIMUM_LENGTH); - this.port = port; - this.maxLength = maxLength; - } - - /** - * Get the output port - * @return - */ - public short getPort() { - return this.port; - } - - /** - * Set the output port - * @param port - */ - public OFActionOutput setPort(short port) { - this.port = port; - return this; - } - - /** - * Get the max length to send to the controller - * @return - */ - public short getMaxLength() { - return this.maxLength; - } - - /** - * Set the max length to send to the controller - * @param maxLength - */ - public OFActionOutput setMaxLength(short maxLength) { - this.maxLength = maxLength; - return this; - } - - @Override - public void readFrom(ByteBuffer data) { - super.readFrom(data); - this.port = data.getShort(); - this.maxLength = data.getShort(); - } - - @Override - public void writeTo(ByteBuffer data) { - super.writeTo(data); - data.putShort(port); - data.putShort(maxLength); - } - - @Override - public int hashCode() { - final int prime = 367; - int result = super.hashCode(); - result = prime * result + maxLength; - result = prime * result + port; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!super.equals(obj)) { - return false; - } - if (!(obj instanceof OFActionOutput)) { - return false; - } - OFActionOutput other = (OFActionOutput) obj; - if (maxLength != other.maxLength) { - return false; - } - if (port != other.port) { - return false; - } - return true; - } - - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return "OFActionOutput [maxLength=" + maxLength + ", port=" + U16.f(port) - + ", length=" + length + ", type=" + type + "]"; - } -} \ No newline at end of file