Examples of unsafeLock()


Examples of org.w3c.tools.resources.ResourceReference.unsafeLock()

        long              size = -1;
        rr = cresource.lookup(name);
        FramedResource resource = null;
        if (rr != null) {
      try {
          resource = (FramedResource) rr.unsafeLock();
          // remove manually deleted FileResources
          if( resource instanceof FileResource ) {
              FileResource fr = (FileResource)resource;
        if( !fr.getFile().exists() ) {
            try {
View Full Code Here

Examples of org.w3c.tools.resources.ResourceReference.unsafeLock()

    return false;
      }
      if (selected != null) {
    try {
        FramedResource resource =
      (FramedResource) selected.unsafeLock();
        resource.lookup(ls, lr);
    } catch (InvalidResourceException ex) {
        // the failure will be processed in perform
    } finally {
        selected.unlock();
View Full Code Here

Examples of org.w3c.tools.resources.ResourceReference.unsafeLock()

      error.setContent("Error negotiating among resource's variants.");
      throw new HTTPException(error) ;
  }

  try {
      FramedResource resource = (FramedResource) selected.unsafeLock();
      Reply reply = (Reply)resource.perform(request) ;
      reply.setHeaderValue(reply.H_VARY, getVary());
      HTTPFrame itsframe =
    (HTTPFrame) resource.unsafeGetFrame(httpFrameClass);
      if (itsframe != null) {
View Full Code Here

Examples of org.w3c.tools.resources.ResourceReference.unsafeLock()

  Vector checked = new Vector(variants.length) ;
  ResourceReference tmpres = null;
  ResourceReference r_parent   = resource.getParent() ;
  try {
      DirectoryResource parent= (DirectoryResource)r_parent.unsafeLock();
      for (int i = 0 ; i < variants.length ; i++) {
    tmpres = parent.lookup(variants[i]) ;
    if (tmpres != null) {
        try {
      FramedResource resource =
View Full Code Here

Examples of org.w3c.tools.resources.ResourceReference.unsafeLock()

  // Look them up in our parent directory:
  ResourceReference variants[] = new ResourceReference[names.length] ;
  ResourceReference r_parent   = resource.getParent() ;
  try {
      DirectoryResource parent= (DirectoryResource)r_parent.unsafeLock();
      int missing = 0;
      for (int i = 0 ; i < names.length ; i++) {
    variants[i] = parent.lookup(names[i]) ;
    if (variants[i] == null)
        missing++;
View Full Code Here

Examples of org.w3c.tools.resources.ResourceReference.unsafeLock()

      HttpAcceptEncoding encodings[] = request.getAcceptEncoding() ;
      for (int i = 0 ; i < states.size() ; i++) {
    VariantState state    = (VariantState) states.elementAt(i) ;
    ResourceReference rr  = state.getResource();
    try {
        FramedResource resource = (FramedResource)rr.unsafeLock() ;
        HTTPFrame itsframe =
      (HTTPFrame) resource.unsafeGetFrame(httpFrameClass);
        if (itsframe != null) {
      String ve;
      ve = (String) itsframe.unsafeGetValue(
View Full Code Here

Examples of org.w3c.tools.resources.ResourceReference.unsafeLock()

      for (int i = 0 ; i < states.size() ; i++ ) {
    VariantState state = (VariantState) states.elementAt(i) ;
    // Get the most specific match for this variant:
    ResourceReference rr = state.getResource();
    try {
        FramedResource resource = (FramedResource)rr.unsafeLock() ;
        HTTPFrame itsframe =
      (HTTPFrame) resource.unsafeGetFrame(httpFrameClass);
        if (itsframe != null) {
      MimeType vt;
      vt = (MimeType) itsframe.unsafeGetValue(
View Full Code Here

Examples of org.w3c.tools.resources.ResourceReference.unsafeLock()

      boolean  varyLang    = false ;
      for (int i = 0 ; i < states.size() ; i++) {
    VariantState state    = (VariantState) states.elementAt(i) ;
    ResourceReference rr  = state.getResource();
    try {
        FramedResource resource = (FramedResource)rr.unsafeLock() ;
        HTTPFrame itsframe =
      (HTTPFrame) resource.getFrame(httpFrameClass);
        if (itsframe != null) {
      String lang;
      lang = (String) itsframe.unsafeGetValue(
View Full Code Here

Examples of org.w3c.tools.resources.ResourceReference.unsafeLock()

      for (int i = 0 ; i < states.size() ; i++ ) {
    VariantState state = (VariantState) states.elementAt(i) ;
    // Get the most specific match for this variant:
    ResourceReference rr = state.getResource();
    try {
        FramedResource resource = (FramedResource)rr.unsafeLock() ;
        HTTPFrame itsframe =
      (HTTPFrame) resource.unsafeGetFrame(httpFrameClass);
        if (itsframe != null) {
      MimeType vt;
      vt = (MimeType) itsframe.unsafeGetValue(
View Full Code Here

Examples of org.w3c.tools.resources.ResourceReference.unsafeLock()

      for (int i = 0 ; i < states.size() ; i++) {
    VariantState state = (VariantState) states.elementAt(i) ;
    String name = null;
    ResourceReference rr = state.getResource();
    try {
        name = rr.unsafeLock().getIdentifier();
        g.append ("<li>"
            + "<a href=\"" + name + "\">" + name + "</a>"
            + " Q= " + state.getQ()) ;
    } catch (InvalidResourceException ex) {
        //FIXME
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.