|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.io.net.GuppyActivist
public class GuppyActivist
This class can handle either side of a binary streamed Guppy conversation. It has convenience methods to write Guppy commands to output, and takes care of file updates etc. in response to input. This allows other classes to implement the logistics of establishing the input and output streams and logic.
| Field Summary |
|---|
| Fields inherited from interface com.partnersoft.io.net.GuppyConstants |
|---|
BLOCKSIZE, BUFFERSIZE, GZIP, OP_DIFF_FILE, OP_EOF, OP_EOT, OP_EXISTING_BLOCKS, OP_FILE_DIFFS, OP_FILE_LISTING, OP_LIST_FILES, OP_MD5, OP_MESSAGE, OP_NAMES, OP_NEW_BYTES, OP_NULL |
| Constructor Summary | |
|---|---|
GuppyActivist()
|
|
| Method Summary | |
|---|---|
boolean |
allowWrites()
|
void |
eot()
|
long |
getBytesReceived()
|
long |
getBytesSent()
|
long |
getBytesUpdated()
|
java.io.DataInputStream |
getInput()
|
java.io.DataOutputStream |
getOutput()
|
java.io.File |
getRootDir()
|
void |
logStatistics()
|
void |
processRemainingInput()
Reads the rest of the input stream and takes whatever action requires. |
java.util.ArrayList |
receiveFileListing(java.lang.String path)
Returns the filesystem listing. |
void |
requestFileListing(java.lang.String path)
Requests a filesystem listing. |
void |
requestFilesystemUpdate()
Requests updates needed to match the server's file list. |
void |
requestFileUpdate(java.lang.String path)
Requests an update to the file at the given path, using the rsync checksum-diff algorithm. |
void |
setAllowWrites(boolean shallI)
|
void |
setInput(java.io.DataInputStream newInput)
|
void |
setOutput(java.io.DataOutputStream newOutput)
|
void |
setRootDir(java.io.File newDir)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GuppyActivist()
| Method Detail |
|---|
public void setInput(java.io.DataInputStream newInput)
public java.io.DataInputStream getInput()
public void setOutput(java.io.DataOutputStream newOutput)
public java.io.DataOutputStream getOutput()
public java.io.File getRootDir()
public void setRootDir(java.io.File newDir)
public boolean allowWrites()
public void setAllowWrites(boolean shallI)
public void requestFileListing(java.lang.String path)
throws java.io.IOException
java.io.IOException
public java.util.ArrayList receiveFileListing(java.lang.String path)
throws java.io.IOException
java.io.IOException
public void requestFilesystemUpdate()
throws java.io.IOException
java.io.IOException
public void requestFileUpdate(java.lang.String path)
throws java.io.IOException
java.io.IOException
public void processRemainingInput()
throws java.io.IOException
java.io.IOException
public void eot()
throws java.io.IOException
java.io.IOExceptionpublic void logStatistics()
public long getBytesSent()
public long getBytesReceived()
public long getBytesUpdated()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||