Merge "Bug 2347: DOMConcurrentDataCommitCoordinator uses wrong phase name"
[controller.git] / third-party / openflowj / src / main / java / org / openflow / protocol / factory / OFQueuePropertyFactory.java
1 package org.openflow.protocol.factory;
2
3 import java.nio.ByteBuffer;
4 import java.util.List;
5
6 import org.openflow.protocol.queue.OFQueueProperty;
7 import org.openflow.protocol.queue.OFQueuePropertyType;
8
9
10 /**
11  * The interface to factories used for retrieving OFQueueProperty instances. All
12  * methods are expected to be thread-safe.
13  * @author David Erickson (daviderickson@cs.stanford.edu)
14  */
15 public interface OFQueuePropertyFactory {
16     /**
17      * Retrieves an OFQueueProperty instance corresponding to the specified
18      * OFQueuePropertyType
19      * @param t the type of the OFQueueProperty to be retrieved
20      * @return an OFQueueProperty instance
21      */
22     public OFQueueProperty getQueueProperty(OFQueuePropertyType t);
23
24     /**
25      * Attempts to parse and return all OFQueueProperties contained in the given
26      * ByteBuffer, beginning at the ByteBuffer's position, and ending at
27      * position+length.
28      * @param data the ByteBuffer to parse for OpenFlow OFQueueProperties
29      * @param length the number of Bytes to examine for OpenFlow OFQueueProperties
30      * @return a list of OFQueueProperty instances
31      */
32     public List<OFQueueProperty> parseQueueProperties(ByteBuffer data, int length);
33
34     /**
35      * Attempts to parse and return all OFQueueProperties contained in the given
36      * ByteBuffer, beginning at the ByteBuffer's position, and ending at
37      * position+length.
38      * @param data the ByteBuffer to parse for OpenFlow OFQueueProperties
39      * @param length the number of Bytes to examine for OpenFlow OFQueueProperties
40      * @param limit the maximum number of OFQueueProperties to return, 0 means no limit
41      * @return a list of OFQueueProperty instances
42      */
43     public List<OFQueueProperty> parseQueueProperties(ByteBuffer data, int length, int limit);
44 }