dluploadclient
Class ThreadUpload

java.lang.Object
  extended by java.lang.Thread
      extended by dluploadclient.ThreadUpload
All Implemented Interfaces:
Runnable

public class ThreadUpload
extends Thread

Cette classe permet de créer un processus léger qui permet d'uploader les fichiers

Copyright 2008, Maurer Gilles

This file is part of Client dl.free.fr.

Client dl.free.fr is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Client dl.free.fr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Client dl.free.fr. If not, see .

Author:
Maurer Gilles

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ThreadUpload(DLUploadClientGUI gui)
          Construteur par défaut
 
Method Summary
 void cancelUpload()
           
 BigDecimal getCurrentSizeUploaded()
          Retourne la taille totale des fichiers déja complètement uploadé
 FTPClient getFTPClient()
          Permet d'accéder au client FTP depuis l'extérieur de la classe
 BigDecimal getTotalSizeToUpload()
          Retourne la taille totale à uploader
 void run()
           
 void setPassword(String password)
          Permet de mettre à jour le mot de passe
 void setUser(String user)
          Permet de mettre à jour l'utilisateur FTP
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadUpload

public ThreadUpload(DLUploadClientGUI gui)
Construteur par défaut

Parameters:
gui - Référence à la fenêtre principale
Method Detail

run

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

setUser

public void setUser(String user)
Permet de mettre à jour l'utilisateur FTP

Parameters:
user - Utilisateur FTP à utiliser

setPassword

public void setPassword(String password)
Permet de mettre à jour le mot de passe

Parameters:
password - Mot de passe FTP à utiliser

getFTPClient

public FTPClient getFTPClient()
Permet d'accéder au client FTP depuis l'extérieur de la classe

Returns:
Une référence vers le client FTP

cancelUpload

public void cancelUpload()

getTotalSizeToUpload

public BigDecimal getTotalSizeToUpload()
Retourne la taille totale à uploader

Returns:
la taille totale à uploader

getCurrentSizeUploaded

public BigDecimal getCurrentSizeUploaded()
Retourne la taille totale des fichiers déja complètement uploadé

Returns:
la taille totale des fichiers déja complètement uploadé