|
From: <ha...@us...> - 2007-01-28 17:26:45
|
Revision: 1550
http://svn.sourceforge.net/cogkit/?rev=1550&view=rev
Author: hategan
Date: 2007-01-28 09:26:42 -0800 (Sun, 28 Jan 2007)
Log Message:
-----------
exceptions...
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/AbstractFileResource.java
Added Paths:
-----------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/IrrecoverableResourceException.java
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/AbstractFileResource.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/AbstractFileResource.java 2007-01-28 17:24:52 UTC (rev 1549)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/AbstractFileResource.java 2007-01-28 17:26:42 UTC (rev 1550)
@@ -10,7 +10,6 @@
package org.globus.cog.abstraction.impl.file;
import java.io.File;
-import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
@@ -122,7 +121,7 @@
/** Equivalent to the cp -r command for copying directories */
public void getDirectory(String remoteDirName, String localDirName)
- throws FileResourceException, IOException {
+ throws FileResourceException {
File localDir = new File(localDirName);
GridFile gridFile = null;
@@ -150,7 +149,7 @@
/** Equivalent to cp -r command for copying directories */
public void putDirectory(String localDirName, String remoteDirName)
- throws FileResourceException, IOException {
+ throws FileResourceException {
File localDir = new File(localDirName);
if (!localDir.exists()) {
throw new DirectoryNotFoundException("Local directory not found");
@@ -193,7 +192,7 @@
* mget - Obtain multiple files from the remote server
*/
public void getMultipleFiles(String[] remoteFileNames,
- String[] localFileNames) throws FileResourceException, IOException {
+ String[] localFileNames) throws FileResourceException {
// If the list of sources not equal to destination lists then error
if (localFileNames.length != remoteFileNames.length)
@@ -219,7 +218,7 @@
* mget - Obtain multiple files from the ftp server
*/
public void getMultipleFiles(String[] remoteFileNames, String localDirName)
- throws FileResourceException, IOException {
+ throws FileResourceException {
for (int index = 0; index < remoteFileNames.length; index++) {
// Extract only the file name to be appended to the destination
// directory
@@ -247,7 +246,7 @@
* mput - copy multiple files to the resource
*/
public void putMultipleFiles(String[] localFileNames, String remoteDirName)
- throws FileResourceException, IOException {
+ throws FileResourceException {
for (int index = 0; index < localFileNames.length; index++) {
// Check every remote file name provided. If file, use putfile else
@@ -268,7 +267,7 @@
* mput - copy multiple files into the resource server
*/
public void putMultipleFiles(String[] localFileNames,
- String[] remoteFileNames) throws FileResourceException, IOException {
+ String[] remoteFileNames) throws FileResourceException {
// If list of sources not equal to list of destinations then error
if (localFileNames.length != remoteFileNames.length)
throw new IllegalArgumentException(
@@ -287,8 +286,7 @@
}
}
- public void createDirectories(String dir) throws FileResourceException,
- IOException {
+ public void createDirectories(String dir) throws FileResourceException {
// TODO there is an assumption here on the path separators
// I'd really suggest enforcing only one of them (hint: '/') at the
// level of the
Added: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/IrrecoverableResourceException.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/IrrecoverableResourceException.java (rev 0)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/IrrecoverableResourceException.java 2007-01-28 17:26:42 UTC (rev 1550)
@@ -0,0 +1,35 @@
+//----------------------------------------------------------------------
+//This code is developed as part of the Java CoG Kit project
+//The terms of the license can be found at http://www.cogkit.org/license
+//This message may not be removed or altered.
+//----------------------------------------------------------------------
+
+/*
+ * Created on Jan 27, 2007
+ */
+package org.globus.cog.abstraction.impl.file;
+
+/**
+ * Signifies an exception that puts a file resource in an irrecoverable
+ * state. If a resource throws this exception during a request, future
+ * requests on this resource will will fail or cause unpredictable
+ * behavior.
+ */
+public class IrrecoverableResourceException extends FileResourceException {
+
+ public IrrecoverableResourceException() {
+ super();
+ }
+
+ public IrrecoverableResourceException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public IrrecoverableResourceException(String message) {
+ super(message);
+ }
+
+ public IrrecoverableResourceException(Throwable cause) {
+ super(cause);
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|