Package fr.dyade.aaa.agent
Class SimpleNetwork.NetworkOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- fr.dyade.aaa.agent.MessageOutputStream
-
- fr.dyade.aaa.agent.BufferedMessageOutputStream
-
- fr.dyade.aaa.agent.SimpleNetwork.NetworkOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Enclosing class:
- SimpleNetwork
final class SimpleNetwork.NetworkOutputStream extends BufferedMessageOutputStream
-
-
Field Summary
-
Fields inherited from class fr.dyade.aaa.agent.BufferedMessageOutputStream
out
-
Fields inherited from class fr.dyade.aaa.agent.MessageOutputStream
buf, compressedFlows, count, oos
-
-
Constructor Summary
Constructors Constructor Description NetworkOutputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidwriteHeader()Writes the protocol header to this output stream.(package private) voidwriteMessage(OutputStream os, Message msg, long currentTimeMillis)Writes a message to the output stream of the socket.-
Methods inherited from class fr.dyade.aaa.agent.BufferedMessageOutputStream
flush, write, write
-
Methods inherited from class fr.dyade.aaa.agent.MessageOutputStream
write, writeInt, writeMessage, writeMessageHeader, writeShort
-
Methods inherited from class java.io.OutputStream
close, nullOutputStream
-
-
-
-
Constructor Detail
-
NetworkOutputStream
NetworkOutputStream() throws IOException- Throws:
IOException
-
-
Method Detail
-
writeHeader
protected void writeHeader()
Writes the protocol header to this output stream.- Specified by:
writeHeaderin classMessageOutputStream
-
writeMessage
void writeMessage(OutputStream os, Message msg, long currentTimeMillis) throws IOException
Writes a message to the output stream of the socket. Be careful, the buffer must be large enough to contain the header.- Parameters:
os- The output stream.msg- The message to write out.currentTimeMillis- The current time in milliseconds, this parameter is used to the handling of notification expiration.- Throws:
IOException- an error occurs.
-
-