4 package org.openflow.io;
7 import org.openflow.protocol.OFMessage;
10 * Interface for writing OFMessages to a buffered stream
12 * @author Rob Sherwood (rob.sherwood@stanford.edu)
15 public interface OFMessageOutStream {
17 * Write an OpenFlow message to the stream
18 * @param m An OF Message
20 public void write(OFMessage m) throws java.io.IOException;
23 * Write an OpenFlow message to the stream.
24 * Messages are sent in one large write() for efficiency
25 * @param l A list of OF Messages
27 public void write(List<OFMessage> l) throws java.io.IOException;
30 * Pushes buffered data out the Stream; this is NOT guranteed to flush all
31 * data, multiple flush() calls may be required, until needFlush() returns
34 public void flush() throws java.io.IOException;
37 * Is there buffered data that needs to be flushed?
38 * @return true if there is buffered data and flush() should be called
40 public boolean needsFlush();