Package org.tamacat.httpd.exception

Examples of org.tamacat.httpd.exception.ServiceUnavailableException


      if (e instanceof org.tamacat.httpd.exception.HttpException) {
        handleException(request, response,
            (org.tamacat.httpd.exception.HttpException)e);
      } else {
        handleException(request, response,
          new ServiceUnavailableException());
      }
    }
  }
View Full Code Here


            item.getName());
            LOG.info("UPLOAD: " + item.getName());
          }
        }
      } catch (IOException e) {
        throw new ServiceUnavailableException(e);
      }
    }
  }
View Full Code Here

        String uri = dir + f;
        boolean result = HdfsFileUtils.delete(nameNodeUrl + uri);
        LOG.info("DELETE: " + uri + ", " + result);
      }
    } catch (IOException e) {
      throw new ServiceUnavailableException(e);
    }
  }
View Full Code Here

      String uri = nameNodeUrl + dir;
      FileSystem fs = FileSystem.get(URI.create(uri), HdfsFileUtils.getConfiguration());
      List<Map<String, String>> list = HdfsFileUtils.get(fs, nameNodeUrl + dir);
      request.setAttribute("list", list);
    } catch (IOException e) {
      throw new ServiceUnavailableException(e);
    }
  } 
View Full Code Here

    }
    List<Map<String, String>> list = new ArrayList<Map<String,String>>();
    try {
      list = HdfsFileUtils.get(fs, path.toUri().getPath());
    } catch (IOException e) {
      throw new ServiceUnavailableException(e);
    }
    context.put("list", list);
      try {
         Template template = getTemplate(listingsPage + ".vm");
         StringWriter writer = new StringWriter();
View Full Code Here

  protected HttpEntity getFileEntity(FileSystem fs, Path path) {
    InputStream in;
    try {
      in = fs.open(path);
    } catch (IOException e) {
      throw new ServiceUnavailableException(e);
    }
    return new InputStreamEntity(in, -1);
  }
View Full Code Here

    } else {
      if (LOG.isWarnEnabled()) {
        LOG.warn(ExceptionUtils.getStackTrace(e, 500));
      }
      html = errorPage.getErrorPage(request, response,
          new ServiceUnavailableException(e));
    }
    HttpEntity entity = getEntity(html);
    ResponseUtils.setEntity(response, entity);
  }
View Full Code Here

      } catch (FileSizeLimitExceededException e) {
        LOG.error(e.getMessage());
        context.setAttribute(EXCEPTION_KEY, e);
      } catch (FileUploadException e) {
        LOG.error(e.getMessage());
        throw new ServiceUnavailableException(e);
      } catch (Exception e) {
        LOG.error(e.getMessage(), e);
        throw new ServiceUnavailableException(e);
      }
    }
  }
View Full Code Here

            if (item.isFormField() == false) {
              writeFile(item, item.getName());
            }
          }
        } catch (IOException e) {
          throw new ServiceUnavailableException(e);
        }
      }
    }
  }
View Full Code Here

              return method.invoke(instance);
            } else {
              return method.invoke(instance, params);
            }
        } catch (Exception e) {
            throw new ServiceUnavailableException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.tamacat.httpd.exception.ServiceUnavailableException

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.