org.globus.ftp.vanilla
Class FTPServerFacade.LocalControlChannel

java.lang.Object
  extended by org.globus.ftp.vanilla.BasicClientControlChannel
      extended by org.globus.ftp.vanilla.FTPServerFacade.LocalControlChannel
All Implemented Interfaces:
BasicServerControlChannel
Enclosing class:
FTPServerFacade

protected class FTPServerFacade.LocalControlChannel
extends BasicClientControlChannel
implements BasicServerControlChannel

This inner class represents a local control channel. One process can write replies using BasicServerControlChannel interface, and the other can read replies using BasicClientControlChannel interface.


Field Summary
 
Fields inherited from class org.globus.ftp.vanilla.BasicClientControlChannel
WAIT_FOREVER
 
Constructor Summary
FTPServerFacade.LocalControlChannel()
           
 
Method Summary
 void abortTransfer()
           
 int getReplyCount()
           
protected  Reply pop()
           
protected  void push(Reply newReply)
           
 Reply read()
           
 boolean ready()
           
 void resetReplyCount()
          set reply count to 0.
 void waitFor(Flag aborted, int ioDelay, int maxWait)
          Block until reply is waiting in the control channel, or after timeout (maxWait), or when flag changes to true.
 void write(Reply reply)
          write reply to the control channel
 
Methods inherited from class org.globus.ftp.vanilla.BasicClientControlChannel
waitFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FTPServerFacade.LocalControlChannel

public FTPServerFacade.LocalControlChannel()
Method Detail

push

protected void push(Reply newReply)

pop

protected Reply pop()
             throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

ready

public boolean ready()

getReplyCount

public int getReplyCount()
Specified by:
getReplyCount in interface BasicServerControlChannel
Returns:
number of replies sent so far

resetReplyCount

public void resetReplyCount()
Description copied from interface: BasicServerControlChannel
set reply count to 0. If this function is used consequently at the beginning of each transfer, then reply count will always indicate number of messages of last transfer.

Specified by:
resetReplyCount in interface BasicServerControlChannel

read

public Reply read()
           throws java.io.IOException,
                  FTPReplyParseException,
                  ServerException
Specified by:
read in class BasicClientControlChannel
Throws:
java.io.IOException
FTPReplyParseException
ServerException

write

public void write(Reply reply)
Description copied from interface: BasicServerControlChannel
write reply to the control channel

Specified by:
write in interface BasicServerControlChannel

waitFor

public void waitFor(Flag aborted,
                    int ioDelay,
                    int maxWait)
             throws ServerException,
                    java.io.IOException,
                    java.lang.InterruptedException
Description copied from class: BasicClientControlChannel
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.

Specified by:
waitFor in class BasicClientControlChannel
maxWait - timeout in miliseconds
Throws:
ServerException
java.io.IOException
java.lang.InterruptedException

abortTransfer

public void abortTransfer()
Specified by:
abortTransfer in class BasicClientControlChannel


Copyright © 2013. All Rights Reserved.