/** * Return a new IndirectContainer with the specified value holder. */ protected Object buildIndirectContainer(ValueHolderInterface valueHolder) { IndirectContainer result = buildIndirectContainer(); result.setValueHolder(valueHolder); return result; }
/** * Return a new IndirectContainer with the specified value holder. */ protected Object buildIndirectContainer(ValueHolderInterface valueHolder) { IndirectContainer result = buildIndirectContainer(); result.setValueHolder(valueHolder); return result; }
/** * Return a new IndirectContainer with the specified value holder. */ protected Object buildIndirectContainer(ValueHolderInterface valueHolder) { IndirectContainer result = buildIndirectContainer(); result.setValueHolder(valueHolder); return result; }
/** * Iterate an indirect container. */ protected void internalIterateIndirectContainer(IndirectContainer container) { ValueHolderInterface containedValueHolder = container.getValueHolder(); if (containedValueHolder instanceof RemoteValueHolder) { containedValueHolder = ((RemoteValueHolder)containedValueHolder).getWrappedServerValueHolder(); } synchronized (containedValueHolder) { // extract VH within sync block to ensure correct one is used. ValueHolderInterface valueHolder = container.getValueHolder(); RemoteValueHolder remoteValueHolder = buildRemoteValueHolderFor(valueHolder); container.setValueHolder(remoteValueHolder); remoteValueHolder.setServerIndirectionObject(container); } }
/** * Iterate an indirect container. */ protected void internalIterateIndirectContainer(IndirectContainer container) { ValueHolderInterface containedValueHolder = container.getValueHolder(); if (containedValueHolder instanceof RemoteValueHolder) { containedValueHolder = ((RemoteValueHolder)containedValueHolder).getWrappedServerValueHolder(); } synchronized (containedValueHolder) { // extract VH within sync block to ensure correct one is used. ValueHolderInterface valueHolder = container.getValueHolder(); RemoteValueHolder remoteValueHolder = buildRemoteValueHolderFor(valueHolder); container.setValueHolder(remoteValueHolder); remoteValueHolder.setServerIndirectionObject(container); } }
/** * Iterate an indirect container. */ protected void internalIterateIndirectContainer(IndirectContainer container) { ValueHolderInterface containedValueHolder = container.getValueHolder(); if (containedValueHolder instanceof RemoteValueHolder) { containedValueHolder = ((RemoteValueHolder)containedValueHolder).getWrappedServerValueHolder(); } synchronized (containedValueHolder) { // extract VH within sync block to ensure correct one is used. ValueHolderInterface valueHolder = container.getValueHolder(); RemoteValueHolder remoteValueHolder = buildRemoteValueHolderFor(valueHolder); container.setValueHolder(remoteValueHolder); remoteValueHolder.setServerIndirectionObject(container); } }
/** * Build a conatiner with the initialized constructor. * @see initializeContainer */ protected IndirectContainer buildContainer(ValueHolderInterface valueHolder) { try { IndirectContainer container = null; if (getContainerConstructor().getParameterTypes().length == 0) { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ container = (IndirectContainer)AccessController.doPrivileged(new PrivilegedInvokeConstructor(getContainerConstructor(), new Object[0])); }else{ container = (IndirectContainer)PrivilegedAccessHelper.invokeConstructor(getContainerConstructor(), new Object[0]); } container.setValueHolder(valueHolder); } else { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ container = (IndirectContainer)AccessController.doPrivileged(new PrivilegedInvokeConstructor(getContainerConstructor(), new Object[] { valueHolder })); }else{ container = (IndirectContainer)PrivilegedAccessHelper.invokeConstructor(getContainerConstructor(), new Object[] { valueHolder }); } } return container; } catch (Exception exception) { throw DescriptorException.invalidIndirectionPolicyOperation(this, "buildContainer constructor (" + getContainerConstructor() + ") Failed: " + exception); } }
/** * Build a conatiner with the initialized constructor. * @see initializeContainer */ protected IndirectContainer buildContainer(ValueHolderInterface valueHolder) { try { IndirectContainer container = null; if (getContainerConstructor().getParameterTypes().length == 0) { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ container = (IndirectContainer)AccessController.doPrivileged(new PrivilegedInvokeConstructor(getContainerConstructor(), new Object[0])); }else{ container = (IndirectContainer)PrivilegedAccessHelper.invokeConstructor(getContainerConstructor(), new Object[0]); } container.setValueHolder(valueHolder); } else { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ container = (IndirectContainer)AccessController.doPrivileged(new PrivilegedInvokeConstructor(getContainerConstructor(), new Object[] { valueHolder })); }else{ container = (IndirectContainer)PrivilegedAccessHelper.invokeConstructor(getContainerConstructor(), new Object[] { valueHolder }); } } return container; } catch (Exception exception) { throw DescriptorException.invalidIndirectionPolicyOperation(this, "buildContainer constructor (" + getContainerConstructor() + ") Failed: " + exception); } }
/** * Build a conatiner with the initialized constructor. * @see initializeContainer */ protected IndirectContainer buildContainer(ValueHolderInterface valueHolder) { try { IndirectContainer container = null; if (getContainerConstructor().getParameterTypes().length == 0) { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ container = (IndirectContainer)AccessController.doPrivileged(new PrivilegedInvokeConstructor(getContainerConstructor(), new Object[0])); }else{ container = (IndirectContainer)PrivilegedAccessHelper.invokeConstructor(getContainerConstructor(), new Object[0]); } container.setValueHolder(valueHolder); } else { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ container = (IndirectContainer)AccessController.doPrivileged(new PrivilegedInvokeConstructor(getContainerConstructor(), new Object[] { valueHolder })); }else{ container = (IndirectContainer)PrivilegedAccessHelper.invokeConstructor(getContainerConstructor(), new Object[] { valueHolder }); } } return container; } catch (Exception exception) { throw DescriptorException.invalidIndirectionPolicyOperation(this, "buildContainer constructor (" + getContainerConstructor() + ") Failed: " + exception); } }
indirectContainer.setValueHolder(uowValueHolder); container = indirectContainer;
indirectContainer.setValueHolder(uowValueHolder); container = indirectContainer;
indirectContainer.setValueHolder(uowValueHolder); container = indirectContainer;