Adds a {@link ConduitWrapper} to the response wrapper chain.

@param wrapper the wrapper
425812
public HttpServerExchange addResponseWrapper(final ConduitWrapper<StreamSinkConduit> wrapper) {
        ConduitWrapper<StreamSinkConduit>[] wrappers = responseWrappers;
        if (responseChannel != null) {
            throw UndertowMessages.MESSAGES.responseChannelAlreadyProvided();
        }
        if(wrappers == null) {
            this.responseWrappers = wrappers = new ConduitWrapper[2];
        } else if (wrappers.length == responseWrapperCount) {
            responseWrappers = new ConduitWrapper[wrappers.length + 2];
            System.arraycopy(wrappers, 0, responseWrappers, 0, wrappers.length);
            wrappers = responseWrappers;
        }
        wrappers[responseWrapperCount++] = wrapper;
        return this;
    }
866909
protected JCATranWrapper createWrapper(int timeout, Xid xid, JCARecoveryData jcard) throws WorkCompletedException /* @512190C*/
    {
        return new JCATranWrapperImpl(timeout, xid, jcard); // @D240298C
    }
818537
public static MfClientHttpRequestFactory createFactoryWrapper(
            final MfClientHttpRequestFactory requestFactory,
            final UriMatchers matchers, final Map<String, List<String>> headers) {
        return new AbstractMfClientHttpRequestFactoryWrapper(requestFactory, matchers, false) {
            @Override
            protected ClientHttpRequest createRequest(
                    final URI uri,
                    final HttpMethod httpMethod,
                    final MfClientHttpRequestFactory requestFactory) throws IOException {
                final ClientHttpRequest request = requestFactory.createRequest(uri, httpMethod);
                request.getHeaders().putAll(headers);
                return request;
            }
        };
    }
321943
private synchronized void registerCacheEventListener(EventListenerWrapper<K, V> wrapper) {
    if(aSyncListenersList.contains(wrapper) || syncListenersList.contains(wrapper)) {
      throw new IllegalStateException("Cache Event Listener already registered: " + wrapper.getListener());
    }

    if (wrapper.isOrdered() && orderedListenerCount++ == 0) {
      storeEventSource.setEventOrdering(true);
    }

    switch (wrapper.getFiringMode()) {
      case ASYNCHRONOUS:
        aSyncListenersList.add(wrapper);
        break;
      case SYNCHRONOUS:
        syncListenersList.add(wrapper);
        break;
      default:
        throw new AssertionError("Unhandled EventFiring value: " + wrapper.getFiringMode());
    }

    if (listenersCount++ == 0) {
      storeEventSource.addEventListener(eventListener);
    }
  }
1140186
public final void setWrapFactory(WrapFactory wrapFactory)
    {
        if (sealed) onSealedMutation();
        if (wrapFactory == null) throw new IllegalArgumentException();
        this.wrapFactory = wrapFactory;
    }
45611
public ConstructorDoc wrap(ConstructorDoc source) {
		if (source == null || source instanceof Proxy<?> || !(source instanceof ConstructorDocImpl)) {
			return source;
		}
		return new ConstructorDocWrapper((ConstructorDocImpl) source);
	}
74773
@Override
    public boolean isWrapperFor(ServletRequest wrapped) {
        final ServletRequest request = getHttpServletRequest();

        if (request == wrapped) {
            return true;
        } else if (request instanceof ServletRequestWrapper) {
            return ((ServletRequestWrapper) request).isWrapperFor(wrapped);
        } else {
            return false;
        }
    }
1366227
public void write(final ComponentDocumentationWrapper componentWrapper, final OutputStream outputStream)
            throws IOException {

        final Map<String, Object> data = new HashMap<>();

        try {
            data.put("breadcrumbs", _breadcrumbs);
            data.put("component", componentWrapper);

            {
                final Set<ConfiguredPropertyDescriptor> configuredProperties =
                        componentWrapper.getComponentDescriptor().getConfiguredProperties();
                final List<ConfiguredPropertyDescriptor> properties = new ArrayList<>(configuredProperties);
                final List<ConfiguredPropertyDocumentationWrapper> propertyList = new ArrayList<>();
                for (final ConfiguredPropertyDescriptor property : properties) {
                    final HiddenProperty hiddenProperty = property.getAnnotation(HiddenProperty.class);
                    final Deprecated deprecatedProperty = property.getAnnotation(Deprecated.class);

                    // we do not show hidden or deprecated properties in docs
                    if ((hiddenProperty == null || hiddenProperty.hiddenForLocalAccess() == false)
                            && deprecatedProperty == null) {
                        final ConfiguredPropertyDocumentationWrapper wrapper =
                                new ConfiguredPropertyDocumentationWrapper(property);
                        propertyList.add(wrapper);
                    }
                }

                data.put("properties", propertyList);
            }

            /* Write data to a file */
            final Writer out = new OutputStreamWriter(outputStream);
            _template.process(data, out);
            out.flush();
            out.close();
        } catch (final TemplateException e) {
            throw new IllegalStateException("Unexpected templare exception", e);
        }
    }
983619
@Override
    public void processElement(Wrapper<Element> elementWrapper) {
        builder.append(baseIndent).append("elementContent=").append(elementWrapper).append("\n");
    }
576179
private void checkWorkCompletionException(WorkWrapper wrapper) throws WorkException
   {
      if (wrapper.getWorkException() != null)
      {
         if (trace)
            log.tracef("Exception %s for %s", wrapper.getWorkException(), this);

         deltaWorkFailed();

         throw wrapper.getWorkException();
      }

      deltaWorkSuccessful();
   }
145716
@Override
    public Conduit getConduit(EndpointInfo endpointInfo, EndpointReferenceType target) throws IOException {
        //create our LibertyHTTPConduit so that we can set the TCCL when run the handleResponseInternal asynchronously
        LibertyHTTPConduit conduit = new LibertyHTTPConduit(bus, endpointInfo, target);

        //following are copied from the super class.
        //Spring configure the conduit.  
        String address = conduit.getAddress();
        if (address != null && address.indexOf('?') != -1) {
            address = address.substring(0, address.indexOf('?'));
        }
        HTTPConduitConfigurer c1 = bus.getExtension(HTTPConduitConfigurer.class);
        if (c1 != null) {
            c1.configure(conduit.getBeanName(), address, conduit);
        }
        configure(conduit, conduit.getBeanName(), address);
        conduit.finalizeConfig();
        //copy end.

        //open the auto redirect when load wsdl, and close auto redirect when process soap message in default.
        //users can open the auto redirect for soap message with ibm-ws-bnd.xml
        if (conduit != null) {
            HTTPClientPolicy clientPolicy = conduit.getClient();

            clientPolicy.setAutoRedirect(CXF_TRANSPORT_URI_RESOLVER_QNAME.equals(endpointInfo.getName()));
        }

        // Set defaultSSLConfig for this HTTP Conduit, in case it is needed when retrieve WSDL from HTTPS URL
        AtomicServiceReference<JaxWsSecurityConfigurationService> secConfigSR = securityConfigSR.get();
        JaxWsSecurityConfigurationService securityConfigService = secConfigSR == null ? null : secConfigSR.getService();
        if (null != securityConfigService) {
            // set null values for sslRef and certAlias so the default one will be used
            securityConfigService.configClientSSL(conduit, null, null);
        }

        return conduit;
    }
947552
public void addResponseCommitListener(final ResponseCommitListener listener) {

        //technically it is possible to modify the exchange after the response conduit has been created
        //as the response channel should not be retrieved until it is about to be written to
        //if we get complaints about this we can add support for it, however it makes the exchange bigger and the connectors more complex
        addResponseWrapper(new ConduitWrapper<StreamSinkConduit>() {
            @Override
            public StreamSinkConduit wrap(ConduitFactory<StreamSinkConduit> factory, HttpServerExchange exchange) {
                listener.beforeCommit(exchange);
                return factory.create();
            }
        });
    }
25882
public static JSONWrapper wrap(String s) {
        if (S.empty(s)) {
            return null;
        }
        return new JSONWrapper(s);
    }
1155826
protected <T> WrapperGenericList<T> processWrapper(TypeReference typeRef, URL url, String errorMessageSuffix) throws MovieDbException {
        String webpage = httpTools.getRequest(url);
        try {
            // Due to type erasure, this doesn't work
            // TypeReference<WrapperGenericList<T>> typeRef = new TypeReference<WrapperGenericList<T>>() {};
            return MAPPER.readValue(webpage, typeRef);
        } catch (IOException ex) {
            throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get " + errorMessageSuffix, url, ex);
        }
    }
1074825
@Override
    public void addAppender(Appender newAppender) {
        if (aai == null) {
            synchronized (this) {
                if (aai == null) {
                    aai = new NFAppenderAttachableImpl();
                }
            }
        }
        aai.addAppender(newAppender);
        repository.fireAddAppenderEvent(this, newAppender);
    }
690323
function RequestWrapper(req) {
  this.request = req;
  this.method = req.method;
  this.url = req.url;
  this.body = req._data;
  this.headers = req._header;
}
1029864
@Override
    public void addAppender(Appender newAppender) {
        // Null values for newAppender parameter are strictly forbidden.
        if (newAppender == null) {
            return;
        }
        // If the appender is already there, add this one to the end before
        // removing the
        // previous one
        boolean isAppenderPresent = appenderList.contains(newAppender);
        String appenderName = newAppender.getName() != null ? newAppender.getName(): "default";
        if (isAppenderPresent) {
            appenderList.add(newAppender);
            for (Iterator<Appender> it = appenderList.iterator(); it.hasNext();) {
                Appender appender = it.next();
                if (newAppender.equals(appender)) {
                    configuredAppenderList.add(appenderName);
                    it.remove();
                    appender.close();
                    return;
                }
            }
        } else {
            appenderList.add(newAppender);
        }
        configuredAppenderList.add(appenderName);
    }