org.avineas.comli.impl
public class LinkHandler extends java.lang.Object
Constructor and Description |
---|
LinkHandler() |
Modifier and Type | Method and Description |
---|---|
static Packet |
read(ReadChannel in,
long timeout,
org.apache.commons.logging.Log logger)
Read a packet from the remote party.
|
static void |
write(WriteChannel out,
Packet packet,
org.apache.commons.logging.Log logger)
Write a packet to another party.
|
public static void write(WriteChannel out, Packet packet, org.apache.commons.logging.Log logger) throws java.io.IOException
out
- The output stream to write overpacket
- The packet to sendjava.io.IOException
- In case of IO errorspublic static Packet read(ReadChannel in, long timeout, org.apache.commons.logging.Log logger) throws java.io.IOException
in
- The input stream to read fromtimeout
- The time to wait for a message to appearlogger
- The logger to use for debug messagesjava.io.IOException
- In case of protocol failures