gov.nasa.gsfc.drl.rtstps.sender
Class SenderThread

java.lang.Object
  extended by java.lang.Thread
      extended by gov.nasa.gsfc.drl.rtstps.sender.SenderThread
All Implemented Interfaces:
java.lang.Runnable

public class SenderThread
extends java.lang.Thread

This thread sends binary file data to a specified port on a target host.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static int BUFFERSIZE
           
private  boolean finished
           
private  java.io.InputStream input
           
private  long msdelay
           
private  java.io.OutputStream output
           
private  int progress
           
static long PROGRESS_SIZE
           
private  boolean running
           
private  Sender sender
           
private  java.net.Socket socket
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SenderThread(Sender parent, java.lang.String host, int port, java.io.File file, int delay)
           
 
Method Summary
(package private)  int getProgress()
           
(package private)  boolean isDone()
           
 void run()
           
(package private)  void terminate()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, 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

PROGRESS_SIZE

public static final long PROGRESS_SIZE
See Also:
Constant Field Values

BUFFERSIZE

public static final int BUFFERSIZE
See Also:
Constant Field Values

msdelay

private long msdelay

output

private java.io.OutputStream output

input

private java.io.InputStream input

socket

private java.net.Socket socket

progress

private int progress

finished

private boolean finished

running

private boolean running

sender

private Sender sender
Constructor Detail

SenderThread

public SenderThread(Sender parent,
                    java.lang.String host,
                    int port,
                    java.io.File file,
                    int delay)
             throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getProgress

final int getProgress()

isDone

final boolean isDone()

terminate

final void terminate()

run

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