Package org.glassfish.contextpropagation.internal

Examples of org.glassfish.contextpropagation.internal.Entry


    default:
      throw new AssertionError("Unsupported context type, " + contextType);
    }
    ContextBootstrap.debug(MessageID.READ_VALUE, value);   
    return contextType == ContextType.OPAQUE ?
        Entry.createOpaqueEntryInstance(value, propModes, className) : new Entry(value, propModes, contextType)
  }
View Full Code Here


      int amountToSkip = catalog.getStart();
      for (int skipped = 0;
          skipped < amountToSkip;
          skipped += ois.skip(amountToSkip - skipped));
      nextKey();
      Entry catalogEntry = nextEntry();
      catalog.setPosisionsFrom((Catalog) catalogEntry.getValue());
      catalog.upItemNumber(-1);
    }
  }
View Full Code Here

      break;
    case VIEW_CAPABLE:
      try {
        PrivilegedWireAdapterAccessor priviledgedCM = (PrivilegedWireAdapterAccessor) ContextMapHelper.getScopeAwareContextMap();
        priviledgedCM.createViewCapable(key, false);
        Entry entry = priviledgedCM.getAccessControlledMap(false).getEntry(key);
        ContextBootstrap.debug(MessageID.READ_VALUE, "<a ViewCapable>");
        EnumSet<PropagationMode> propModes = readPropModes();
        ContextBootstrap.debug(MessageID.READ_PROP_MODES, propModes);
        return entry;
      } catch (InsufficientCredentialException e) {
        throw new AssertionError("Wire adapter should have sufficient privileges to create a ViewCapable.");
      }
    case SERIALIZABLE:
      value = WLSContext.HELPER.readFromBytes(readBytes(ois));
      break;
    case BIGDECIMAL: case BIGINTEGER: case ATOMICINTEGER: case ATOMICLONG:
      value = ois.readObject();
      break;
    case CHAR:
      value = ois.readChar();
      break;
    case DOUBLE:
      value = ois.readDouble();
      break;
    case FLOAT:
      value = ois.readFloat();
      break;
    case OPAQUE:
      boolean hasClassName = ois.readBoolean();
      className = hasClassName ? readAscii() : null;
      byte[] bytes = readBytes(ois);
      SerializableContextFactory factory = WireAdapter.HELPER.findContextFactory(key, className);
      value = factory == null ?
          bytes : WLSContext.HELPER.readFromBytes(factory.createInstance(), bytes);
      break;
    default:
      // TODO log unexpected case
      break;
    }
    ContextBootstrap.debug(MessageID.READ_VALUE, value);
    EnumSet<PropagationMode> propModes = readPropModes();
    ContextBootstrap.debug(MessageID.READ_PROP_MODES, propModes);
    return className == null ? new Entry(value, propModes, contextType) :
      Entry.createOpaqueEntryInstance(value, propModes, className);
  }
View Full Code Here

TOP

Related Classes of org.glassfish.contextpropagation.internal.Entry

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.