fr.dyade.aaa.agent
Class SimpleNetwork.NetworkOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by fr.dyade.aaa.agent.MessageOutputStream
          extended by fr.dyade.aaa.agent.BufferedMessageOutputStream
              extended by fr.dyade.aaa.agent.SimpleNetwork.NetworkOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable
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, logmon, oos
 
Constructor Summary
SimpleNetwork.NetworkOutputStream()
           
 
Method Summary
protected  void writeHeader()
          Writes the protocol header to this output stream.
(package private)  void writeMessage(java.io.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
getLogger, write, writeInt, writeMessage, writeMessageHeader, writeShort
 
Methods inherited from class java.io.OutputStream
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleNetwork.NetworkOutputStream

SimpleNetwork.NetworkOutputStream()
                            throws java.io.IOException
Throws:
java.io.IOException
Method Detail

writeHeader

protected void writeHeader()
Writes the protocol header to this output stream.

Specified by:
writeHeader in class MessageOutputStream

writeMessage

void writeMessage(java.io.OutputStream os,
                  Message msg,
                  long currentTimeMillis)
            throws java.io.IOException
Writes a message to the output stream of the socket. Be careful, the buffer must be large enough to contain the header.

Parameters:
sock - The output socket.
msg - The message to write out.
currentTimeMillis - The current time in milliseconds, this parameter is used to the handling of notification expiration.
Throws:
java.io.IOException


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.