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);
}