Package org.w3c.tools.resources

Examples of org.w3c.tools.resources.ResourceException


     */
    protected Reply headFileResource(Request request)
  throws ProtocolException, ResourceException
    {
  if (fresource == null)
      throw new ResourceException("this frame is not attached to a "+
              "FileResource. ("+
              resource.getIdentifier()+")");
  Reply reply = null;
  fresource.checkContent();
  updateCachedHeaders();
View Full Code Here


     */
    protected Reply getFileResource(Request request)
  throws ProtocolException, ResourceException
    {
  if (fresource == null)
      throw new ResourceException("this frame is not attached to a "+
          "FileResource. ("+
          resource.getIdentifier()+")");
  Reply reply = null;
  File file = fresource.getFile() ;
  fresource.checkContent();
View Full Code Here

     */
    protected Reply getFileResource(Request request)
  throws ProtocolException, ResourceException
    {
  if (fresource == null)
      throw new ResourceException("this frame is not attached to a "+
          "FileResource. ("+
          resource.getIdentifier()+")");
  Reply reply = null;
  File file = fresource.getFile() ;
  fresource.checkContent();
View Full Code Here

    protected Reply createFileReply(Request request)
  throws ProtocolException, ResourceException
    {
  Reply reply = null;
  if (zipfresource == null) {
      throw new ResourceException("this frame is not attached to a "+
          "ZipFileResource. ("+
          resource.getIdentifier()+")");
  }
  // Default to full reply:
  reply = createDefaultReply(request, HTTP.OK) ;
View Full Code Here

     */
    protected Reply getFileResource(Request request)
  throws ProtocolException, ResourceException
    {
  if (fresource == null)
      throw new ResourceException("this frame is not attached to a "+
          "FileResource. ("+
          resource.getIdentifier()+")");
  Reply reply = null;
  File file = fresource.getFile() ;
  fresource.checkContent();
View Full Code Here

  } catch (IOException ex) {

  }
  PageCompiler compiler = getCompiler();
  if (compiler == null)
      throw new ResourceException("Can't load compiler: "+
        getPageCompileProps().getCompilerClassName());
  String args[] = { classFile.getAbsolutePath() };
  PageCompileOutputStream out = new PageCompileOutputStream();
  if (! compiler.compile(args, out)) {
      //FIXME Warning
      if (out.size() > 0) {
    Reply error = request.makeReply(HTTP.INTERNAL_SERVER_ERROR);
    error.setStream(out.getInputStream());
    error.setContentLength(out.size());
    error.setContentType(MimeType.TEXT_PLAIN);
    throw new HTTPException(error);
      }
  }
  //load class now
  try {
      GeneratedClassLoader loader = getClassLoader();
      if (loader.classChanged(getPackagedClassName()))
    loader = getNewClassLoader();
      Class generatedClass = loader.loadClass(getPackagedClassName());
      GeneratedFrame gframe =
    (GeneratedFrame) generatedClass.newInstance();
      return gframe;
  } catch (Exception ex) {
      throw new ResourceException(ex.getMessage());
  }
    }
View Full Code Here

          childrr.unlock();
      }
        }
    }
      } catch (InvalidResourceException ex) {
    throw new ResourceException("Invalid parent (latest):"+
              ex.getMessage());
      } finally {
    rr.unlock();
      }
      if (lmbest != 0) {
View Full Code Here

    public Reply getDirectoryListing(Request request)
  throws ProtocolException, ResourceException
    {
  if (! (resource instanceof ContainerResource)) {
      throw new ResourceException("this frame is not attached to a "+
          "ContainerResource. ("+
          resource.getIdentifier()+")");
  }
  // delete us if the directory was deleted
  boolean refresh = false;
View Full Code Here

     */
    protected Reply getFileResource(Request request)
  throws ProtocolException, ResourceException
    {
  if (fresource == null)
      throw new ResourceException("this frame is not attached to a "+
          "FileResource. ("+
          resource.getIdentifier()+")");
  Reply reply = null;
  if (!checkExpect(request)) {
      reply = createDefaultReply(request, HTTP.EXPECTATION_FAILED);
View Full Code Here

     */
    protected Reply headFileResource(Request request)
  throws ProtocolException, ResourceException
    {
  if (fresource == null)
      throw new ResourceException("this frame is not attached to a "+
              "FileResource. ("+
              resource.getIdentifier()+")");
  Reply reply = null;
  if (!checkExpect(request)) {
      reply = createDefaultReply(request, HTTP.EXPECTATION_FAILED);
View Full Code Here

TOP

Related Classes of org.w3c.tools.resources.ResourceException

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.