X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=third-party%2Fopenflowj_netty%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenflow%2Fprotocol%2FOFQueueGetConfigReply.java;fp=third-party%2Fopenflowj_netty%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenflow%2Fprotocol%2FOFQueueGetConfigReply.java;h=0000000000000000000000000000000000000000;hb=64fe0fbca1a6c2b77ad25f568d73a7eb64236d16;hp=62be90d59f4106e8a6581dcf81bc5153cee83ce1;hpb=8b9a3ff2bbc83941254b46b818cbbae5cc1a3a5b;p=openflowjava.git diff --git a/third-party/openflowj_netty/src/main/java/org/openflow/protocol/OFQueueGetConfigReply.java b/third-party/openflowj_netty/src/main/java/org/openflow/protocol/OFQueueGetConfigReply.java deleted file mode 100644 index 62be90d5..00000000 --- a/third-party/openflowj_netty/src/main/java/org/openflow/protocol/OFQueueGetConfigReply.java +++ /dev/null @@ -1,125 +0,0 @@ -/** -* Copyright 2012, Andrew Ferguson, Brown University -* -* Licensed under the Apache License, Version 2.0 (the "License"); you may -* not use this file except in compliance with the License. You may obtain -* a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -* License for the specific language governing permissions and limitations -* under the License. -**/ - -package org.openflow.protocol; - -import java.util.ArrayList; -import java.util.List; - -import org.jboss.netty.buffer.ChannelBuffer; -import org.openflow.util.U16; - -/** - * Represents an ofp_queue_get_config_request message - * @author Andrew Ferguson (adf@cs.brown.edu) - */ -public class OFQueueGetConfigReply extends OFMessage { - public static int MINIMUM_LENGTH = 16; - - protected short portNumber; - protected List queues = new ArrayList(); - - public OFQueueGetConfigReply() { - super(); - this.type = OFType.QUEUE_GET_CONFIG_REPLY; - this.length = U16.t(MINIMUM_LENGTH); - } - - /** - * @return the portNumber - */ - public short getPortNumber() { - return portNumber; - } - - /** - * @param portNumber the portNumber to set - */ - public void setPortNumber(short portNumber) { - this.portNumber = portNumber; - } - - /** - * @return the port's queues - */ - public List getQueues() { - return queues; - } - - /** - * @param queues the queues to set - */ - public void setQueues(List queues) { - this.queues.clear(); - this.queues.addAll(queues); - } - - @Override - public void readFrom(ChannelBuffer data) { - super.readFrom(data); - this.portNumber = data.readShort(); - data.readInt(); // pad - data.readShort(); // pad - - int availLength = (this.length - MINIMUM_LENGTH); - this.queues.clear(); - - while (availLength > 0) { - OFPacketQueue queue = new OFPacketQueue(); - queue.readFrom(data); - queues.add(queue); - availLength -= queue.getLength(); - } - } - - @Override - public void writeTo(ChannelBuffer data) { - super.writeTo(data); - data.writeShort(this.portNumber); - data.writeInt(0); // pad - data.writeShort(0); // pad - - for (OFPacketQueue queue : queues) { - queue.writeTo(data); - } - } - - @Override - public int hashCode() { - final int prime = 349; - int result = super.hashCode(); - result = prime * result + portNumber; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!super.equals(obj)) { - return false; - } - if (!(obj instanceof OFQueueGetConfigReply)) { - return false; - } - OFQueueGetConfigReply other = (OFQueueGetConfigReply) obj; - if (portNumber != other.portNumber) { - return false; - } - return true; - } -}