extensions/net.sf.basedb.torrent/trunk/src/main/net/sf/basedb/clients/torrent/service/TorrentState.java

Code
Comments
Other
Rev Date Author Line
1255 22 Oct 10 nicklas 1 /**
1255 22 Oct 10 nicklas 2   $Id $
1255 22 Oct 10 nicklas 3
1255 22 Oct 10 nicklas 4   Copyright (C) 2010 Nicklas Nordborg
1255 22 Oct 10 nicklas 5
1255 22 Oct 10 nicklas 6   This file is part of Bittorent download service for BASE.
1255 22 Oct 10 nicklas 7   Available at http://baseplugins.thep.lu.se/
1255 22 Oct 10 nicklas 8
1255 22 Oct 10 nicklas 9   BASE is free software; you can redistribute it and/or
1255 22 Oct 10 nicklas 10   modify it under the terms of the GNU General Public License
1255 22 Oct 10 nicklas 11   as published by the Free Software Foundation; either version 2
1255 22 Oct 10 nicklas 12   of the License, or (at your option) any later version.
1255 22 Oct 10 nicklas 13
1255 22 Oct 10 nicklas 14   BASE is distributed in the hope that it will be useful,
1255 22 Oct 10 nicklas 15   but WITHOUT ANY WARRANTY; without even the implied warranty of
1255 22 Oct 10 nicklas 16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1255 22 Oct 10 nicklas 17   GNU General Public License for more details.
1255 22 Oct 10 nicklas 18
1255 22 Oct 10 nicklas 19   You should have received a copy of the GNU General Public License
1255 22 Oct 10 nicklas 20   along with this program; if not, write to the Free Software
1255 22 Oct 10 nicklas 21   Foundation, Inc., 59 Temple Place - Suite 330,
1255 22 Oct 10 nicklas 22   Boston, MA  02111-1307, USA.
1255 22 Oct 10 nicklas 23 */
1255 22 Oct 10 nicklas 24 package net.sf.basedb.clients.torrent.service;
1255 22 Oct 10 nicklas 25
1255 22 Oct 10 nicklas 26 /**
1255 22 Oct 10 nicklas 27   Represents the state of an active torrent.
1255 22 Oct 10 nicklas 28   
1255 22 Oct 10 nicklas 29   @author nicklas
1255 22 Oct 10 nicklas 30   @since 1.0
1255 22 Oct 10 nicklas 31 */
1255 22 Oct 10 nicklas 32 public enum TorrentState 
1255 22 Oct 10 nicklas 33 {
1255 22 Oct 10 nicklas 34   /**
1255 22 Oct 10 nicklas 35     Initial state of a new TorrentManager. Is awaiting more
1255 22 Oct 10 nicklas 36     configuration options before downloading can start.
1255 22 Oct 10 nicklas 37   */
1255 22 Oct 10 nicklas 38   INITIAL,
1255 22 Oct 10 nicklas 39   
1255 22 Oct 10 nicklas 40   /**
1255 22 Oct 10 nicklas 41     The torrent is ready be downloaded.
1255 22 Oct 10 nicklas 42   */
1255 22 Oct 10 nicklas 43   READY_TO_DOWNLOAD,
1255 22 Oct 10 nicklas 44   
1255 22 Oct 10 nicklas 45   /**
1255 22 Oct 10 nicklas 46     The torrent is downloading.
1255 22 Oct 10 nicklas 47   */
1255 22 Oct 10 nicklas 48   DOWNLOADING,
1255 22 Oct 10 nicklas 49   
1255 22 Oct 10 nicklas 50   /**
1255 22 Oct 10 nicklas 51     The torrent has been completely downloaded.
1255 22 Oct 10 nicklas 52   */
1255 22 Oct 10 nicklas 53   DOWNLOAD_COMPLETE,
1255 22 Oct 10 nicklas 54   
1255 22 Oct 10 nicklas 55   /**
1255 22 Oct 10 nicklas 56     The files are being copied to the BASE filesystem.
1255 22 Oct 10 nicklas 57   */
1255 22 Oct 10 nicklas 58   UPLOADING,
1255 22 Oct 10 nicklas 59   
1255 22 Oct 10 nicklas 60   /**
1299 25 Feb 11 nicklas 61     The files have been successfully copied to the BASE file system.
1299 25 Feb 11 nicklas 62   */
1299 25 Feb 11 nicklas 63   UPLOAD_COMPLETE,
1299 25 Feb 11 nicklas 64   
1299 25 Feb 11 nicklas 65   /**
1255 22 Oct 10 nicklas 66     Something went wrong and the torrent and temporary files
1255 22 Oct 10 nicklas 67     should be deleted. The error information should be
1255 22 Oct 10 nicklas 68     propagated to the associated job.
1255 22 Oct 10 nicklas 69   */
1255 22 Oct 10 nicklas 70   ERROR,
1255 22 Oct 10 nicklas 71   
1255 22 Oct 10 nicklas 72   /**
1255 22 Oct 10 nicklas 73     The torrent files has been uploaded to BASE. Temporary
1255 22 Oct 10 nicklas 74     working files should be deleted and the TorrentManager
1255 22 Oct 10 nicklas 75     should be destroyed.
1255 22 Oct 10 nicklas 76   */
1255 22 Oct 10 nicklas 77   DONE;
1255 22 Oct 10 nicklas 78   
1255 22 Oct 10 nicklas 79 }