Source Code Cross Referenced for LinkedRemoteFileInterface.java in  » Net » DrFTPD » org » drftpd » remotefile » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » DrFTPD » org.drftpd.remotefile 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file is part of DrFTPD, Distributed FTP Daemon.
003:         *
004:         * DrFTPD is free software; you can redistribute it and/or modify
005:         * it under the terms of the GNU General Public License as published by
006:         * the Free Software Foundation; either version 2 of the License, or
007:         * (at your option) any later version.
008:         *
009:         * DrFTPD is distributed in the hope that it will be useful,
010:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
011:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012:         * GNU General Public License for more details.
013:         *
014:         * You should have received a copy of the GNU General Public License
015:         * along with DrFTPD; if not, write to the Free Software
016:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
017:         */
018:        package org.drftpd.remotefile;
019:
020:        import java.io.FileNotFoundException;
021:        import java.io.IOException;
022:        import java.util.Collection;
023:        import java.util.List;
024:        import java.util.Map;
025:        import java.util.Set;
026:
027:        import net.sf.drftpd.FileExistsException;
028:        import net.sf.drftpd.NoAvailableSlaveException;
029:
030:        import org.drftpd.SFVFile;
031:        import org.drftpd.master.RemoteSlave;
032:        import org.drftpd.remotefile.LinkedRemoteFile.NonExistingFile;
033:
034:        /**
035:         * @author mog
036:         * @version $Id: LinkedRemoteFileInterface.java 1513 2006-10-13 22:41:08Z tdsoul $
037:         *
038:         */
039:        public interface LinkedRemoteFileInterface extends RemoteFileInterface {
040:            /**
041:             * Updates lastMofidied() on this directory, use putFile() to avoid it.
042:             */
043:            public abstract LinkedRemoteFile addFile(RemoteFileInterface file);
044:
045:            public abstract void addSlave(RemoteSlave slave);
046:
047:            /**
048:             * @throws ClassCastException if object is not an instance of RemoteFileInterface.
049:             * @see java.lang.Comparable#compareTo(java.lang.Object)
050:             */
051:            public abstract int compareTo(Object o);
052:
053:            public abstract LinkedRemoteFile createDirectories(String path);
054:
055:            public abstract LinkedRemoteFile createDirectory(String fileName)
056:                    throws FileExistsException;
057:
058:            public abstract LinkedRemoteFile createDirectory(String owner,
059:                    String group, String fileName) throws FileExistsException;
060:
061:            /**
062:             * Deletes a file or directory, if slaves are offline, the file cannot be deleted.
063:             * To work around this, the file gets a deleted flag set and when the offline slave is remerge()'d, it is deleted from the slave and delete() is called again.
064:             *
065:             * Trying to lookupFile() or getFile() a deleted file throws FileNotFoundException.
066:             */
067:            public abstract void delete();
068:
069:            public abstract long dirSize();
070:
071:            public abstract Collection<RemoteSlave> getAvailableSlaves()
072:                    throws NoAvailableSlaveException;
073:
074:            /**
075:             * Uses cached checksum if the cached checksum is not 0
076:             */
077:            public abstract long getCheckSum() throws NoAvailableSlaveException;
078:
079:            /**
080:             * Returns 0 if the checksum cannot be read.
081:             */
082:            public abstract long getCheckSumFromSlave()
083:                    throws NoAvailableSlaveException, IOException;
084:
085:            public abstract Collection<LinkedRemoteFileInterface> getDirectories();
086:
087:            /**
088:             * Returns fLinkedRemoteFileInterfaced in this directory.
089:             *
090:             * @param fileName
091:             * @throws FileNotFoundException if fileName doesn't exist in the files Map
092:             */
093:            public abstract LinkedRemoteFileInterface getFile(String fileName)
094:                    throws FileNotFoundException;
095:
096:            /**
097:             * Returns the underlying Map for this directory.
098:             *
099:             * It is dangerous to modify without knowing what you're doing.
100:             * Dirsize needs to be taken into account as well as sending approperiate commands to the slaves.
101:             * @return the underlying Map for this directory.
102:             */
103:            public abstract Map getMap();
104:
105:            public abstract LinkedRemoteFile getParentFile()
106:                    throws FileNotFoundException;
107:
108:            public abstract LinkedRemoteFile getParentFileNull();
109:
110:            public abstract LinkedRemoteFile getRoot();
111:
112:            public abstract SFVFile getSFVFile() throws IOException,
113:                    FileNotFoundException, NoAvailableSlaveException,
114:                    FileStillTransferringException;
115:
116:            public abstract long getXferspeed();
117:
118:            /**
119:             * Returns true if this directory contains a file named filename, this is case sensitive.
120:             * @param filename The name of the file
121:             * @return true if this directory contains a file named filename, this is case sensitive.
122:             */
123:            public abstract boolean hasFile(String filename);
124:
125:            public abstract int hashCode();
126:
127:            /**
128:             * Returns true if this file or directory uses slaves that are currently offline.
129:             * @return true if this file or directory uses slaves that are currently offline.
130:             */
131:            public abstract boolean hasOfflineSlaves();
132:
133:            public abstract boolean hasSlave(RemoteSlave slave);
134:
135:            /**
136:             * Does file have online slaves?
137:             *
138:             * @return Always true for directories
139:             */
140:            public abstract boolean isAvailable();
141:
142:            /**
143:             * Is file removed from all slaves?
144:             */
145:            public abstract boolean isDeleted();
146:
147:            public abstract LinkedRemoteFile lookupFile(String path)
148:                    throws FileNotFoundException;
149:
150:            public abstract LinkedRemoteFile lookupFile(String path,
151:                    boolean followLinks) throws FileNotFoundException;
152:
153:            public abstract NonExistingFile lookupNonExistingFile(String path);
154:
155:            public abstract NonExistingFile lookupNonExistingFile(String path,
156:                    boolean followLinks);
157:
158:            /**
159:             * Returns path for a non-existing file. Performs path normalization and returns an absolute path
160:             */
161:            public abstract String lookupPath(String path);
162:
163:            public abstract SFVFile lookupSFVFile() throws IOException,
164:                    FileNotFoundException, NoAvailableSlaveException,
165:                    FileStillTransferringException;
166:
167:            /**
168:             * Use addFile() if you want lastModified to be updated.
169:             */
170:            public abstract LinkedRemoteFile putFile(RemoteFileInterface file);
171:
172:            /**
173:             * Merges mergedir directory onto <code>this</code> directories.
174:             * If duplicates exist, the slaves are added to this object and the file-attributes of the oldest file (lastModified) are kept.
175:             */
176:            public abstract void remerge(
177:                    CaseInsensitiveHashtable lightRemoteFiles,
178:                    RemoteSlave rslave) throws IOException;
179:
180:            public abstract boolean removeSlave(RemoteSlave slave);
181:
182:            /**
183:             * Renames this file
184:             */
185:            public abstract void renameTo(String toDirPath, String toName)
186:                    throws IOException, FileNotFoundException;
187:
188:            public abstract void setCheckSum(long checkSum);
189:
190:            public abstract void setGroup(String group);
191:
192:            public abstract void setLastModified(long lastModified);
193:
194:            public abstract void setLength(long length);
195:
196:            public abstract void setOwner(String owner);
197:
198:            public abstract long getXfertime();
199:
200:            public abstract void setXfertime(long xfertime);
201:
202:            public abstract String toString();
203:
204:            public abstract void unmergeDir(RemoteSlave rslave);
205:
206:            public abstract void unmergeFile(RemoteSlave rslave);
207:
208:            public abstract void deleteFromSlave(RemoteSlave rslave);
209:
210:            public abstract Collection<LinkedRemoteFileInterface> getFiles2();
211:
212:            public abstract List<LinkedRemoteFileInterface> getAllParentFiles();
213:
214:            /**
215:             * @return
216:             */
217:            public abstract boolean isValid();
218:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.