4 package org.openflow.io;
8 import org.openflow.protocol.OFMessage;
9 import org.openflow.protocol.factory.OFMessageFactory;
12 * Interface for reading OFMessages from a buffered stream
14 * @author Rob Sherwood (rob.sherwood@stanford.edu)
17 public interface OFMessageInStream {
19 * Read OF messages from the stream
21 * @return a list of OF Messages, empty if no complete messages are
22 * available, null if the stream has closed
24 public List<OFMessage> read() throws java.io.IOException;
27 * Read OF messages from the stream
30 * The maximum number of messages to read: 0 means all that are
32 * @return a list of OF Messages, empty if no complete messages are
33 * available, null if the stream has closed
36 public List<OFMessage> read(int limit) throws java.io.IOException;
39 * Sets the OFMessageFactory used to create messages on this stream
43 public void setMessageFactory(OFMessageFactory factory);
46 * Returns the OFMessageFactory used to create messages on this stream
50 public OFMessageFactory getMessageFactory();