wjhk.jupload2.upload
Class PacketConstructionThread

java.lang.Object
  extended by java.lang.Thread
      extended by wjhk.jupload2.upload.PacketConstructionThread
All Implemented Interfaces:
Runnable

public class PacketConstructionThread
extends Thread

Author:
etienne_sf

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  FileUploadManagerThread fileUploadManagerThread
          The thread which globally manages the upload
(package private)  boolean lastFileReceived
          Indicates when the last file has been received.
(package private)  UploadFilePacket packetInProgress
          The packet this instance is working on.
(package private)  BlockingQueue<UploadFilePacket> packetQueue
          The queue where each prepared file will be stored, for further processing
(package private)  BlockingQueue<UploadFileData> preparedFileQueue
          The queue where each prepared file are stored, for further processing.
(package private)  UploadPolicy uploadPolicy
          The current upload policy.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PacketConstructionThread(BlockingQueue<UploadFileData> preparedFileQueue, BlockingQueue<UploadFilePacket> packetQueue, FileUploadManagerThread fileUploadManagerThread, UploadPolicy uploadPolicy)
           
 
Method Summary
 void run()
          The actual command to generate packets.
 
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

uploadPolicy

UploadPolicy uploadPolicy
The current upload policy.


fileUploadManagerThread

FileUploadManagerThread fileUploadManagerThread
The thread which globally manages the upload


preparedFileQueue

BlockingQueue<UploadFileData> preparedFileQueue
The queue where each prepared file are stored, for further processing. This class picks files here, and post them to the packetQueue.


packetQueue

BlockingQueue<UploadFilePacket> packetQueue
The queue where each prepared file will be stored, for further processing


packetInProgress

UploadFilePacket packetInProgress
The packet this instance is working on.


lastFileReceived

boolean lastFileReceived
Indicates when the last file has been received. The last file is the poisonned

Constructor Detail

PacketConstructionThread

PacketConstructionThread(BlockingQueue<UploadFileData> preparedFileQueue,
                         BlockingQueue<UploadFilePacket> packetQueue,
                         FileUploadManagerThread fileUploadManagerThread,
                         UploadPolicy uploadPolicy)
Method Detail

run

public final void run()
The actual command to generate packets.

Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Thread.run()