org.elite.jdcbot.framework
Class DownloadHandler

java.lang.Object
  extended by org.elite.jdcbot.framework.DCIO
      extended by org.elite.jdcbot.framework.DownloadHandler
All Implemented Interfaces:
java.lang.Runnable

public class DownloadHandler
extends DCIO
implements java.lang.Runnable

Created on 26-May-08
Handels all the downloads from a single user for a session.

Since:
0.7
Version:
0.1.1
Author:
AppleGrew

Field Summary
private  DownloadManager _dm
           
private  jDCBot _jdcbot
           
private  java.net.Socket _socket
           
private  User _u
           
private  boolean close
           
private  java.util.List<DUEntity> DownloadEntityQ
           
private  int in_buffer_size
           
private  java.lang.Thread th
           
private  boolean threadstarted
           
 
Constructor Summary
DownloadHandler(User user, jDCBot jdcbot, DownloadManager dm)
           
 
Method Summary
 void close()
           
 void download(DUEntity de)
           
 java.lang.String getUserName()
           
 void notifyPassiveConnect(java.net.Socket socket)
           
 void run()
           
 
Methods inherited from class org.elite.jdcbot.framework.DCIO
parseCmdArgs, parseCmdName, parseRawCmd, ReadCommand, ReadCommand, SendCommand, SendCommand, set_IOExceptionMsg
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in_buffer_size

private final int in_buffer_size
See Also:
Constant Field Values

DownloadEntityQ

private java.util.List<DUEntity> DownloadEntityQ

_u

private User _u

_jdcbot

private jDCBot _jdcbot

_dm

private DownloadManager _dm

_socket

private java.net.Socket _socket

close

private volatile boolean close

threadstarted

private volatile boolean threadstarted

th

private java.lang.Thread th
Constructor Detail

DownloadHandler

public DownloadHandler(User user,
                       jDCBot jdcbot,
                       DownloadManager dm)
Method Detail

close

public void close()

download

public void download(DUEntity de)

notifyPassiveConnect

public void notifyPassiveConnect(java.net.Socket socket)

getUserName

public java.lang.String getUserName()

run

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