org.openflow.io
Interface OFMessageOutStream

All Known Implementing Classes:
OFMessageAsyncStream

public interface OFMessageOutStream

Interface for writing OFMessages to a buffered stream

Author:
Rob Sherwood (rob.sherwood@stanford.edu)

Method Summary
 void flush()
          Pushes buffered data out the Stream; this is NOT guranteed to flush all data, multiple flush() calls may be required, until needFlush() returns false.
 boolean needsFlush()
          Is there buffered data that needs to be flushed?
 void write(java.util.List<OFMessage> l)
          Write an OpenFlow message to the stream.
 void write(OFMessage m)
          Write an OpenFlow message to the stream
 

Method Detail

write

void write(OFMessage m)
           throws java.io.IOException
Write an OpenFlow message to the stream

Parameters:
m - An OF Message
Throws:
java.io.IOException

write

void write(java.util.List<OFMessage> l)
           throws java.io.IOException
Write an OpenFlow message to the stream. Messages are sent in one large write() for efficiency

Parameters:
l - A list of OF Messages
Throws:
java.io.IOException

flush

void flush()
           throws java.io.IOException
Pushes buffered data out the Stream; this is NOT guranteed to flush all data, multiple flush() calls may be required, until needFlush() returns false.

Throws:
java.io.IOException

needsFlush

boolean needsFlush()
Is there buffered data that needs to be flushed?

Returns:
true if there is buffered data and flush() should be called