com.partnersoft.v3x.net
Class GuppyDaemon

java.lang.Object
  extended by com.partnersoft.v3x.net.GuppyDaemon
All Implemented Interfaces:
GuppyConstants, java.lang.Runnable

public class GuppyDaemon
extends java.lang.Object
implements GuppyConstants, java.lang.Runnable

A very simple, minimal, but efficient file transfer server. Features compression.


Field Summary
 
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
GuppyDaemon()
          Starts up a guppy daemon on a random port.
GuppyDaemon(int port)
          Starts up an exchange socket on the specified port.
GuppyDaemon(int port, boolean verbose)
          Starts up an exchange socket on the specified port.
 
Method Summary
 java.lang.String getAddress()
           
 java.io.File getBaseDir()
           
 int getPort()
           
static void launch()
           
static void launch(java.io.File baseDir)
           
static void main(java.lang.String[] args)
           
 void run()
           
 void setBaseDir(java.io.File newDir)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuppyDaemon

public GuppyDaemon()
            throws java.io.IOException
Starts up a guppy daemon on a random port. Get the port using getPort()

Throws:
java.io.IOException

GuppyDaemon

public GuppyDaemon(int port)
            throws java.io.IOException
Starts up an exchange socket on the specified port.

Throws:
java.io.IOException

GuppyDaemon

public GuppyDaemon(int port,
                   boolean verbose)
            throws java.io.IOException
Starts up an exchange socket on the specified port.

Throws:
java.io.IOException
Method Detail

main

public static void main(java.lang.String[] args)

launch

public static void launch()
                   throws java.io.IOException
Throws:
java.io.IOException

launch

public static void launch(java.io.File baseDir)
                   throws java.io.IOException
Throws:
java.io.IOException

run

public void run()
Specified by:
run in interface java.lang.Runnable

stop

public void stop()

getPort

public int getPort()

getAddress

public java.lang.String getAddress()

getBaseDir

public java.io.File getBaseDir()

setBaseDir

public void setBaseDir(java.io.File newDir)