Package edu.jas.util

Class TaggedSocketChannel

java.lang.Object
java.lang.Thread
edu.jas.util.TaggedSocketChannel
All Implemented Interfaces:
Runnable

public class TaggedSocketChannel extends Thread
TaggedSocketChannel provides a communication channel with message tags for Java objects using TCP/IP sockets.
  • Field Details

    • logger

      private static final org.apache.logging.log4j.Logger logger
    • debug

      private static final boolean debug
    • isRunning

      private volatile boolean isRunning
      Flag if receiver is running.
    • DONE

      private static final String DONE
      End message.
      See Also:
    • blockedCount

      private final AtomicInteger blockedCount
      Blocked threads count.
    • sc

      protected final SocketChannel sc
      Underlying socket channel.
    • queues

      protected final Map<Integer,BlockingQueue> queues
      Queues for each message tag.
  • Constructor Details

    • TaggedSocketChannel

      public TaggedSocketChannel(SocketChannel s)
      Constructs a tagged socket channel on the given socket channel s.
      Parameters:
      s - A socket channel object.
  • Method Details