public abstract class AbstractTransmission
extends java.lang.Thread
| Constructor and Description |
|---|
AbstractTransmission(AbstractTransmissionAdapter adapter)
Creates a new AbstarctTransmission instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelTransmission()
Cancels the transmission.
|
double |
getAveragSpeed()
Returns the calculated average speed in Bytes/s.
|
java.lang.String |
getResourceName()
Returns the name of the resource transmitted by this
AbstractTransmission instance or a text describing the it. |
long |
getTotalLength()
Returns the total length of this transmission in bytes or -1 if the transmission is infinite.
|
long |
getTransmissionId()
Returns an id unique for every instance of
AbstractTransmission |
long |
getTransmittedLength()
Returns the already transmitted length in bytes.
|
boolean |
isCanceled()
Returns true if this transmission was canceled, false otherwise
|
boolean |
isDone()
Returns true if this transmission is done.
|
void |
run() |
void |
startTransmission()
Starts the transmission.
|
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, yieldpublic AbstractTransmission(AbstractTransmissionAdapter adapter)
adapter - The AbstractTransmissionAdapter that should be informed about progress updates or nullpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void startTransmission()
cancelTransmission()public void cancelTransmission()
public boolean isCanceled()
public boolean isDone()
cancelTransmission();public long getTransmissionId()
AbstractTransmissionAbstractTransmissionpublic long getTotalLength()
setTotalLength(long)public double getAveragSpeed()
public long getTransmittedLength()
increaseTransmittedLength(long)public java.lang.String getResourceName()
AbstractTransmission instance or a text describing the it.AbstractTransmission instance or a text describing the it.