blob: 87a8bb66145a10297ac3d243014d33ea0ff56fc4 [file] [log] [blame]
package org.onlab.netty;
import java.io.IOException;
/**
* A unit of communication.
* Has a payload. Also supports a feature to respond back to the sender.
*/
public interface Message {
/**
* Returns the payload of this message.
* @return message payload.
*/
public byte[] payload();
/**
* Sends a reply back to the sender of this message.
* @param data payload of the response.
* @throws IOException if there is a communication error.
*/
public void respond(byte[] data) throws IOException;
}