org.metastatic.rsync.v2
Class Sender

java.lang.Object
  |
  +--org.metastatic.rsync.v2.Sender
All Implemented Interfaces:
Constants, EventListener, MatcherListener

public class Sender
extends Object
implements Constants, MatcherListener


Field Summary
 
Fields inherited from interface org.metastatic.rsync.v2.Constants
_S_IFDIR, _S_IFLNK, _S_IFMT, _S_IFREG, AT_ERROR, BLOCK_LENGTH, CHUNK_SIZE, FLAG_DELETE, FLIST_RECEIVE_DONE, FLIST_RECEIVE_FILES, FLIST_RECEIVE_GIDS, FLIST_RECEIVE_UIDS, FLIST_SEND_DONE, FLIST_SEND_FILES, FLIST_SEND_GIDS, FLIST_SEND_UIDS, INPUT_MASK, LONG_NAME, MAX_PROTOCOL_VERSION, MAXPATHLEN, MIN_PROTOCOL_VERSION, OUTPUT_MASK, PROTOCOL_VERSION, RECV_RECEIVE_DELTAS, RECV_RECEIVE_INDEX, RECV_SEND_INDEX, RECV_SEND_SUMS, RECV_WAIT, RSYNCD_AUTHREQD, RSYNCD_EXIT, RSYNCD_GREETING, RSYNCD_OK, RSYNCD_PORT, SAME_DIR, SAME_GID, SAME_MODE, SAME_NAME, SAME_RDEV, SAME_TIME, SAME_UID, SENDER_DONE, SENDER_RECEIVE_INDEX, SENDER_RECEIVE_SUMS, SENDER_SEND_DELTAS, SENDER_SEND_FILE, SENDER_WAIT, SETUP_READ_AUTH, SETUP_READ_DONE, SETUP_READ_GREETING, SETUP_READ_MODULE, SETUP_READ_OPTIONS, SETUP_WRITE_CHALLENGE, SETUP_WRITE_DONE, SETUP_WRITE_ERROR, SETUP_WRITE_GREETING, SETUP_WRITE_MODULES, SETUP_WRITE_OK, SETUP_WRITE_WAIT, STATE_DONE, STATE_INPUT_DONE, STATE_OUTPUT_DONE, STATE_RECEIVE_EXCLUDE, STATE_RECEIVE_FLIST, STATE_RECEIVER, STATE_RECEIVER_INPUT, STATE_RECEIVER_OUTPUT, STATE_SEND_FLIST, STATE_SENDER, STATE_SENDER_INPUT, STATE_SENDER_OUTPUT, STATE_SETUP_PROTOCOL, SUM_LENGTH, URL_PREFIX
 
Constructor Summary
Sender(MultiplexedInputStream in, MultiplexedOutputStream out, Configuration config, int remoteVersion, boolean amServer)
          Create a new Sender object.
 
Method Summary
 Statistics getStatistics()
           
 void sendFiles(List files)
          Send the set of files.
 void setStatistics(Statistics newStats)
           
 void update(MatcherEvent e)
          Update with a single, new delta.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sender

public Sender(MultiplexedInputStream in,
              MultiplexedOutputStream out,
              Configuration config,
              int remoteVersion,
              boolean amServer)
Create a new Sender object.

Parameters:
in - The underlying input stream.
out - The underlying output stream.
config - The configuration to use.
remoteVersion - The remote protocol version.
amServer - Should be true if we are the server.
Method Detail

setStatistics

public void setStatistics(Statistics newStats)

getStatistics

public Statistics getStatistics()

sendFiles

public void sendFiles(List files)
               throws IOException
Send the set of files.

IOException

update

public void update(MatcherEvent e)
            throws ListenerException
Description copied from interface: MatcherListener
Update with a single, new delta.

Specified by:
update in interface MatcherListener
Parameters:
e - The next delta event.
ListenerException