Class OutputStreamMessageWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, IMessageWriter

    public class OutputStreamMessageWriter
    extends java.lang.Object
    implements IMessageWriter
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.slf4j.Logger logger  
      private java.nio.channels.SocketChannel outputChannel  
    • Constructor Summary

      Constructors 
      Constructor Description
      OutputStreamMessageWriter​(java.nio.channels.SocketChannel _out)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      boolean isClosed()  
      void writeMessage​(Message _msg)
      Write a message out to the bus.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        private final org.slf4j.Logger logger
      • outputChannel

        private java.nio.channels.SocketChannel outputChannel
    • Constructor Detail

      • OutputStreamMessageWriter

        public OutputStreamMessageWriter​(java.nio.channels.SocketChannel _out)
    • Method Detail

      • writeMessage

        public void writeMessage​(Message _msg)
                          throws java.io.IOException
        Description copied from interface: IMessageWriter
        Write a message out to the bus.
        Specified by:
        writeMessage in interface IMessageWriter
        Parameters:
        _msg - The message to write
        Throws:
        java.io.IOException - If an IO error occurs.
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException