Package org.w3c.tools.resources

Examples of org.w3c.tools.resources.ResourceException


    protected Reply getOtherResource(Request request)
  throws ProtocolException, ResourceException
    {
  CheckpointResource chkpr = getChekpointResource();
  if (chkpr == null)
      throw new ResourceException("this frame is not attached to a "+
          "CheckpointResource. ("+
          getResource().getIdentifier()+")");
  String query = request.getQueryString();
  if ( query != null ) {
      if ( query.equals("start") ) {
View Full Code Here


        Class http_class = null;
        try {
      http_class =
          Class.forName("org.w3c.jigsaw.frames.HTTPFrame");
        } catch (ClassNotFoundException ex) {
      throw new ResourceException(ex.getMessage());
        }
        ResourceReference rrf = p.getFrameReference(http_class);
        if (rrf == null) {
      throw new ResourceException("DirectoryResource has "+
                "no HTTPFrame");
        }
        try {
      HTTPFrame httpframe = (HTTPFrame) rrf.unsafeLock();
      if (p instanceof DirectoryResource)
          return httpframe.getDirectoryListing(request);
      else
          return httpframe.get(request);
        } catch (InvalidResourceException ex) {
      throw new ResourceException(
          "Invalid parent frame (lister):"+
          ex.getMessage());
        } finally {
      rrf.unlock();
        }
    }
      } catch (InvalidResourceException ex) {
    throw new ResourceException("Invalid parent (lister):"+
              ex.getMessage());
      } finally {
    rr.unlock();
      }
  } else {
View Full Code Here

    {
  DirectoryResource dirResource = null;
  try {
      dirResource = (DirectoryResource) getDirResourceRef().lock();
      if (dirResource == null)
    throw new ResourceException("parent is NOT a "+
              "DirectoryResource. ("+
              resource.getIdentifier()+")");
      if (! dirResource.verify()) {
    // the directory was deleted, but we can't delete it here
    // (Multiple Locks)
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;
  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

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.