KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > drftpd > slave > Slave


1 /*
2  * This file is part of DrFTPD, Distributed FTP Daemon.
3  *
4  * DrFTPD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * DrFTPD is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with DrFTPD; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18 package net.sf.drftpd.slave;
19
20 import java.io.IOException JavaDoc;
21 import java.net.InetSocketAddress JavaDoc;
22 import java.rmi.Remote JavaDoc;
23 import java.rmi.RemoteException JavaDoc;
24
25 import net.sf.drftpd.SFVFile;
26 import net.sf.drftpd.remotefile.LinkedRemoteFile;
27
28 /**
29  * Slave interface, this interface is used to initate transfers to and from remote slaves.
30  * @author Morgan Christiansson <mog@linux.nu>
31  * @version $Id: Slave.java,v 1.31 2004/05/10 02:54:00 mog Exp $
32  */

33 public interface Slave extends Remote JavaDoc {
34     public long checkSum(
35         String JavaDoc path)
36         throws RemoteException JavaDoc, IOException JavaDoc;
37         
38     public Transfer listen(boolean encrypted) throws RemoteException JavaDoc, IOException JavaDoc;
39     public Transfer connect(InetSocketAddress JavaDoc addr, boolean encrypted) throws RemoteException JavaDoc;
40     /**
41      * Get statistics for this slave, usefull when deciding which slave to use when transferring files.
42      */

43     public SlaveStatus getSlaveStatus() throws RemoteException JavaDoc;
44
45     /**
46      * Check to see if slave is still up.
47      */

48     public void ping() throws RemoteException JavaDoc;
49     
50     public SFVFile getSFVFile(String JavaDoc path)
51         throws RemoteException JavaDoc, IOException JavaDoc;
52     
53     /**
54      * Rename files.
55      */

56     public void rename(String JavaDoc from, String JavaDoc toDirPath, String JavaDoc toName)
57         throws RemoteException JavaDoc, IOException JavaDoc;
58         
59     /**
60      * Delete files.
61      */

62     public void delete(String JavaDoc path) throws RemoteException JavaDoc, IOException JavaDoc;
63     /**
64      * Builds a new updated slaveroot
65      */

66     public LinkedRemoteFile getSlaveRoot() throws IOException JavaDoc;
67 }
68
Popular Tags