Package org.archive.wayback.exception

Examples of org.archive.wayback.exception.LiveWebTimeoutException


          ArcResource ar = (ArcResource)
            ResourceFactory.ARCArchiveRecordToResource(r, null);
          if(ar.getStatusCode() == 502) {
            throw new LiveDocumentNotAvailableException(urlString);
          } else if(ar.getStatusCode() == 504) {
            throw new LiveWebTimeoutException("Timeout:" + urlString);
          }
          success = true;
          return ar;
         
        } else {
          throw new LiveWebCacheUnavailableException(urlString);
        }

      } catch (ResourceNotAvailableException e) {
        throw new LiveDocumentNotAvailableException(urlString);

      } catch (NoHttpResponseException e) {

        throw new LiveWebCacheUnavailableException("No Http Response for "
            + urlString);

      } catch (ConnectException e) {
        throw new LiveWebCacheUnavailableException(e.getLocalizedMessage()
            + " : " + urlString);
      } catch (SocketException e) {
        throw new LiveWebCacheUnavailableException(e.getLocalizedMessage()
            + " : " + urlString);
      } catch (SocketTimeoutException e) {
        throw new LiveWebTimeoutException(e.getLocalizedMessage()
            + " : " + urlString);
      } catch(ConnectTimeoutException e) {
        throw new LiveWebTimeoutException(e.getLocalizedMessage()
            + " : " + urlString);       
    } finally {
      if (!success) {
        method.abort();
      }
View Full Code Here

TOP

Related Classes of org.archive.wayback.exception.LiveWebTimeoutException

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.