Class Serializer

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

    public class Serializer
    extends java.lang.Object
    implements java.io.Closeable
    Event serializer.
    • Field Detail

      • lock

        private final java.lang.Object lock
        Should help in ensuring the right order of stream writes.
      • writer

        private java.io.Writer writer
      • events

        private final java.util.ArrayDeque<RemoteEvent> events
      • doForcedShutdown

        private volatile java.lang.Throwable doForcedShutdown
      • forceCloseDaemon

        private java.lang.Thread forceCloseDaemon
      • forceCloseDaemonQuit

        private java.util.concurrent.atomic.AtomicBoolean forceCloseDaemonQuit
    • Constructor Detail

      • Serializer

        public Serializer​(java.io.OutputStream os)
                   throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • serialize

        public Serializer serialize​(RemoteEvent event)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • flushQueue

        private void flushQueue()
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • flush

        public Serializer flush()
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • 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