1 package org.openflow.protocol.factory;
3 import java.nio.ByteBuffer;
6 import org.openflow.protocol.action.OFAction;
7 import org.openflow.protocol.action.OFActionType;
11 * The interface to factories used for retrieving OFAction instances. All
12 * methods are expected to be thread-safe.
13 * @author David Erickson (daviderickson@cs.stanford.edu)
15 public interface OFActionFactory {
17 * Retrieves an OFAction instance corresponding to the specified
19 * @param t the type of the OFAction to be retrieved
20 * @return an OFAction instance
22 public OFAction getAction(OFActionType t);
25 * Attempts to parse and return all OFActions contained in the given
26 * ByteBuffer, beginning at the ByteBuffer's position, and ending at
28 * @param data the ByteBuffer to parse for OpenFlow actions
29 * @param length the number of Bytes to examine for OpenFlow actions
30 * @return a list of OFAction instances
32 public List<OFAction> parseActions(ByteBuffer data, int length);
35 * Attempts to parse and return all OFActions contained in the given
36 * ByteBuffer, beginning at the ByteBuffer's position, and ending at
38 * @param data the ByteBuffer to parse for OpenFlow actions
39 * @param length the number of Bytes to examine for OpenFlow actions
40 * @param limit the maximum number of messages to return, 0 means no limit
41 * @return a list of OFAction instances
43 public List<OFAction> parseActions(ByteBuffer data, int length, int limit);