com.partnersoft.v3x.net
Class WebGuppyClient

java.lang.Object
  extended by com.partnersoft.v3x.net.WebGuppyClient
All Implemented Interfaces:
GuppyConstants

public class WebGuppyClient
extends java.lang.Object
implements GuppyConstants

A simpler version of guppy that uses HTTP PUT to send the requests and receives the results as the output from HTTP.


Field Summary
static int MAX_TRANSFERS
           
static int SYNC_FREQUENCY
           
 
Fields inherited from interface com.partnersoft.v3x.net.GuppyConstants
COMMAND_BYE, COMMAND_CHECKSUM, COMMAND_COMPRESS_OFF, COMMAND_COMPRESS_ON, COMMAND_DATA, COMMAND_DELETE, COMMAND_FILE_EXISTS, COMMAND_GET, COMMAND_GET_CHECKSUM_HEADER, COMMAND_HEARTBEAT, COMMAND_MESSAGE, COMMAND_NODATA, COMMAND_NOK, COMMAND_OK, COMMAND_PUT, COMMAND_SYNC
 
Constructor Summary
WebGuppyClient(java.lang.String address)
           
 
Method Summary
 void close()
           
 void delete(java.lang.String path)
           
 void download(java.lang.String path)
           
 void download(java.lang.String path, java.io.File filet)
           
 void downloadFiles()
           
 boolean fileExists(java.lang.String path)
           
 long getChecksumHeader(java.lang.String path)
           
 boolean isVerbose()
           
 void message(java.lang.String message)
           
 void setVerbose(boolean tizit)
           
 void sync()
           
 void upload(java.lang.String path)
           
 void upload(java.lang.String path, java.io.File filet)
           
 void uploadFiles()
           
 void uploadTree(java.io.File source, java.lang.String destination)
          Uploads an entire directory tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYNC_FREQUENCY

public static final int SYNC_FREQUENCY
See Also:
Constant Field Values

MAX_TRANSFERS

public static final int MAX_TRANSFERS
See Also:
Constant Field Values
Constructor Detail

WebGuppyClient

public WebGuppyClient(java.lang.String address)
               throws java.io.IOException
Throws:
java.io.IOException
Method Detail

upload

public void upload(java.lang.String path)
            throws java.io.IOException
Throws:
java.io.IOException

upload

public void upload(java.lang.String path,
                   java.io.File filet)
            throws java.io.IOException
Throws:
java.io.IOException

download

public void download(java.lang.String path)
              throws java.io.IOException
Throws:
java.io.IOException

download

public void download(java.lang.String path,
                     java.io.File filet)
              throws java.io.IOException
Throws:
java.io.IOException

sync

public void sync()
          throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

uploadTree

public void uploadTree(java.io.File source,
                       java.lang.String destination)
                throws java.io.IOException
Uploads an entire directory tree. It will become a subdir of the given destination.

Throws:
java.io.IOException

downloadFiles

public void downloadFiles()
                   throws java.io.IOException
Throws:
java.io.IOException

uploadFiles

public void uploadFiles()
                 throws java.io.IOException
Throws:
java.io.IOException

getChecksumHeader

public long getChecksumHeader(java.lang.String path)
                       throws java.io.IOException
Throws:
java.io.IOException

fileExists

public boolean fileExists(java.lang.String path)
                   throws java.io.IOException
Throws:
java.io.IOException

delete

public void delete(java.lang.String path)
            throws java.io.IOException
Throws:
java.io.IOException

message

public void message(java.lang.String message)
             throws java.io.IOException
Throws:
java.io.IOException

isVerbose

public boolean isVerbose()

setVerbose

public void setVerbose(boolean tizit)