Class JFTP.ChanSet

  • Enclosing class:
    JFTP

    private static class JFTP.ChanSet
    extends java.lang.Object
    Implementation of a set type structure for holding ChannelOutput objects with a flag to indicate that the request set is currently being processed.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean beingProcessed
      true if a class is currently being loaded.
      private java.util.Vector set
      Holds the ChannelOutput objects.
    • Constructor Summary

      Constructors 
      Constructor Description
      ChanSet​(ChannelOutput out)
      Constructs a new ChanSet with an initial entry in the set.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addRequest​(ChannelOutput out)
      Adds a request (the channel to reply on) to the set.
      boolean isBeingProcessed()
      Returns true if a class is being loaded by another thread.
      void nowBeingProcessed()
      Sets the flag to indicate that a class is currently being loaded.
      void writeToAll​(JFTP.ClassReply reply)
      Broadcast the reply to all of the clients in the set.
      • Methods inherited from class java.lang.Object

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

      • set

        private java.util.Vector set
        Holds the ChannelOutput objects.
      • beingProcessed

        private boolean beingProcessed
        true if a class is currently being loaded.
    • Constructor Detail

      • ChanSet

        public ChanSet​(ChannelOutput out)
        Constructs a new ChanSet with an initial entry in the set.
    • Method Detail

      • nowBeingProcessed

        public void nowBeingProcessed()
        Sets the flag to indicate that a class is currently being loaded.
      • isBeingProcessed

        public boolean isBeingProcessed()
        Returns true if a class is being loaded by another thread.
      • addRequest

        public void addRequest​(ChannelOutput out)
        Adds a request (the channel to reply on) to the set.
        Parameters:
        out - channel to send the reply on.
      • writeToAll

        public void writeToAll​(JFTP.ClassReply reply)
        Broadcast the reply to all of the clients in the set.
        Parameters:
        reply - the message to send.