Package java.io

Examples of java.io.SyncFailedException


         // Get the content options
         List<DeploymentOption> deploymentOptions = Arrays.asList(options);
         boolean failIfAlreadyExsists = isFailIfAlreadyExists()
                  || deploymentOptions.contains(DeploymentOption.FailIfExists);
         if(exists && failIfAlreadyExsists)
            throw new SyncFailedException("Deployment content already exists: "+ contentFile.getAbsolutePath());
        
         // Check if we need unpack this deployment
         if(deploymentOptions.contains(DeploymentOption.Explode))
         {
            // Unjar
View Full Code Here


      fos.close();
      raf.close();
      if( javaFile.delete() == false )
         log.severe("Failed to delete java file: "+javaFile);
      if( bakFile.renameTo(javaFile) == false )
         throw new SyncFailedException("Failed to replace: "+javaFile);
   }
View Full Code Here

      fos.close();
      raf.close();
      if (!javaFile.delete())
         log.severe("Failed to delete java file: " + javaFile);
      if (!bakFile.renameTo(javaFile))
         throw new SyncFailedException("Failed to replace: " + javaFile);
   }
View Full Code Here

         File contentRoot = getPhaseDir(phase);
         if(contentRoot == null)
            throw new FileNotFoundException("Failed to obtain content dir for phase: "+phase);
         File contentFile = new File(contentRoot, name);
         if(failIfAlreadyExists && contentFile.exists())
            throw new SyncFailedException("Deployment content already exists: "+contentFile.getAbsolutePath());
         FileOutputStream fos = new FileOutputStream(contentFile);
         try
         {
            byte[] tmp = new byte[4096];
            int read;
View Full Code Here

            getChannel().force( metaData);
        }
        catch( ClosedChannelException cce) { throw cce;}
        catch( IOException ioe)
        {
            SyncFailedException sne = new SyncFailedException( ioe.getMessage());
            sne.initCause( ioe);
            throw sne;
        }
    } // end of sync
View Full Code Here

  public void testExceptionsIdentifiedByInterceptor() throws IOException {
    Throwable[] networkexceptions = new Throwable[] {
        new ConnectException("Mary is unwell"),
        new SocketTimeoutException("Mike is too late"),
        new ClosedChannelException(),
        new SyncFailedException("Dave is not on the same page"),
        new TimeoutException("Mike is late again"),
        new EOFException("This is the end... "),
        new ConnectionClosingException("Its closing") };
    final String INDUCED = "Induced";
    Throwable[] nonNetworkExceptions = new Throwable[] {
View Full Code Here

         File contentFile = new File(contentRoot, vfsPath);
        
         // Check if it already exists
         boolean exists = contentFile.exists();
         if(exists && isFailIfAlreadyExists())
            throw new SyncFailedException("Deployment content already exists: "+ contentFile.getAbsolutePath());
        
         // Copy streams
         FileOutputStream fos = new FileOutputStream(contentFile);
         try
         {
View Full Code Here

    break;
   if (isIOErrorInterrupted0(res) == 0)
   {
    if (isStdInOutErr(fd))
     break;
    throw new SyncFailedException(getIOErrorMsg0(res));
   }
   threadYield();
  } while (true);
}
View Full Code Here

            getChannel().force( metaData);
        }
        catch( ClosedChannelException cce) { throw cce;}
        catch( IOException ioe)
        {
            SyncFailedException sne = new SyncFailedException( ioe.getMessage());
            sne.initCause( ioe);
            throw sne;
        }
    } // end of sync
View Full Code Here

TOP

Related Classes of java.io.SyncFailedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.