Class BasicClientControlChannel

  • Direct Known Subclasses:
    FTPControlChannel, FTPServerFacade.LocalControlChannel

    public abstract class BasicClientControlChannel
    extends java.lang.Object
    Basic subset of client side control channel functionality, enough to implement the part of transfer after sending transfer command (RETR) up until receiving 200 reply.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int WAIT_FOREVER  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void abortTransfer()  
      abstract Reply read()  
      void waitFor​(Flag flag, int waitDelay)
      Return when reply is waiting
      abstract void waitFor​(Flag flag, int waitDelay, int maxWait)
      Block until reply is waiting in the control channel, or after timeout (maxWait), or when flag changes to true.
      • Methods inherited from class java.lang.Object

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

      • BasicClientControlChannel

        public BasicClientControlChannel()
    • Method Detail

      • waitFor

        public void waitFor​(Flag flag,
                            int waitDelay)
                     throws ServerException,
                            java.io.IOException,
                            java.lang.InterruptedException
        Return when reply is waiting
        Throws:
        ServerException
        java.io.IOException
        java.lang.InterruptedException
      • waitFor

        public abstract void waitFor​(Flag flag,
                                     int waitDelay,
                                     int maxWait)
                              throws ServerException,
                                     java.io.IOException,
                                     java.lang.InterruptedException
        Block until reply is waiting in the control channel, or after timeout (maxWait), or when flag changes to true. If maxWait == WAIT_FOREVER, do not timeout.
        Parameters:
        maxWait - timeout in miliseconds
        Throws:
        ServerException
        java.io.IOException
        java.lang.InterruptedException
      • abortTransfer

        public abstract void abortTransfer()