Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## network
Class ReliableNetworkListener

    java.lang.Object
      java.lang.Thread
          network.ReliableNetworkListener

All Implemented Interfaces:
  java.lang.Runnable

    public class ReliableNetworkListener

extends java.lang.Thread

Objects of this class listen on TCP socket for requests for reliable transmissions which can be either download or upload of file fragment or checksum.

Nested Class Summary

Nested classes/interfaces inherited from class java.lang.Thread
`java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler`

Field Summary
`static int` | `BROADCAST`
`static int` | `FANIN`

Fields inherited from class java.lang.Thread
`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

Method Summary
`void` | `close()`
`static ReliableNetworkListener` | `getFactory()` Builds thread listening on local TCP port for incoming files.
`void` | `run()` Listens for incoming TCP connections and starts appropriate instance of client, which will download or upload files.

Methods inherited from class java.lang.Thread
`activeCount, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, checkAccess, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### FANIN

    public static final int FANIN

See Also:
  Constant Field Values

### BROADCAST

    public static final int BROADCAST

See Also:
  Constant Field Values

Method Detail

### getFactory

    public static ReliableNetworkListener getFactory()
                                              throws java.io.IOException

  Builds thread listening on local TCP port for incoming files. Allows existence of only single class of this type.

  Returns:
    Instance of client factory.
  Throws:
    `java.io.IOException` - if no TCP socket could be started

### close

    public void close()
               throws java.io.IOException

  Throws:
    `java.io.IOException`

### run

    public void run()

  Listens for incoming TCP connections and starts appropriate instance of client, which will download or upload files. Only files that have been already requested to be backed up are allowed to be downloaded to localhost.

  Specified by:
    `run` in interface `java.lang.Runnable`
  Overrides:
    `run` in class `java.lang.Thread`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD