Package org.globus.ftp.vanilla
Class FTPServerFacade.LocalControlChannel
- java.lang.Object
-
- org.globus.ftp.vanilla.BasicClientControlChannel
-
- 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
Constructors Constructor Description LocalControlChannel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
Method Detail
-
push
protected void push(Reply newReply)
-
pop
protected Reply pop() throws InterruptedException
- Throws:
InterruptedException
-
ready
public boolean ready()
-
getReplyCount
public int getReplyCount()
- Specified by:
getReplyCount
in interfaceBasicServerControlChannel
- 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 interfaceBasicServerControlChannel
-
read
public Reply read() throws IOException, FTPReplyParseException, ServerException
- Specified by:
read
in classBasicClientControlChannel
- Throws:
IOException
FTPReplyParseException
ServerException
-
write
public void write(Reply reply)
Description copied from interface:BasicServerControlChannel
write reply to the control channel- Specified by:
write
in interfaceBasicServerControlChannel
-
waitFor
public void waitFor(Flag aborted, int ioDelay, int maxWait) throws ServerException, IOException, 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 classBasicClientControlChannel
maxWait
- timeout in miliseconds- Throws:
ServerException
IOException
InterruptedException
-
abortTransfer
public void abortTransfer()
- Specified by:
abortTransfer
in classBasicClientControlChannel
-
-