Package org.glassfish.jersey.model.internal

Examples of org.glassfish.jersey.model.internal.CommonConfig$FeatureRegistration


         *
         * @param client bound parent Jersey client.
         */
        State(JerseyClient client) {
            this.strategy = IDENTITY;
            this.commonConfig = new CommonConfig(RuntimeType.CLIENT, ComponentBag.EXCLUDE_EMPTY);
            this.client = client;
            this.connectorProvider = new HttpUrlConnectorProvider();
        }
View Full Code Here


         * @param original configuration strategy to be copied.
         */
        private State(JerseyClient client, State original) {
            this.strategy = IDENTITY;
            this.client = client;
            this.commonConfig = new CommonConfig(original.commonConfig);
            this.connectorProvider = original.connectorProvider;
        }
View Full Code Here

                assertEquals(-1, contentLength);
                passed.pass();
                return null;
            }
        });
        CommonConfig configuration = new CommonConfig(runtime, ComponentBag.INCLUDE_ALL);
        configuration.setProperties(properties);
        outboundMessageContext.enableBuffering(configuration);

        final OutputStream entityStream = outboundMessageContext.getEntityStream();
        for (int i = 1; (i < 1000000) && (!passed.b); i++) {
            entityStream.write((byte) 65);
View Full Code Here

public class JaxbStringReaderProviderTest {
    @Test
    public void stringReaderDoesNotReadExternalDtds() {

        Provider<SAXParserFactory> saxParserFactoryProvider = new Provider<SAXParserFactory>() {
            final SaxParserFactoryInjectionProvider spf = new SaxParserFactoryInjectionProvider(new CommonConfig(RuntimeType.SERVER, ComponentBag.INCLUDE_ALL));

            @Override
            public SAXParserFactory get() {
                return spf.provide();
            }
View Full Code Here

         *
         * @param client bound parent Jersey client.
         */
        State(final JerseyClient client) {
            this.strategy = IDENTITY;
            this.commonConfig = new CommonConfig(RuntimeType.CLIENT, ComponentBag.EXCLUDE_EMPTY);
            this.client = client;
            this.connectorProvider = new HttpUrlConnectorProvider();
        }
View Full Code Here

         * @param original configuration strategy to be copied.
         */
        private State(final JerseyClient client, final State original) {
            this.strategy = IDENTITY;
            this.client = client;
            this.commonConfig = new CommonConfig(original.commonConfig);
            this.connectorProvider = original.connectorProvider;
        }
View Full Code Here

         * state change strategy.
         *
         * @param client bound parent Jersey client.
         */
        State(JerseyClient client) {
            this.commonConfig = new CommonConfig(RuntimeType.CLIENT, ComponentBag.EXCLUDE_EMPTY);
            this.client = client;
            this.strategy = IDENTITY;
            this.connector = null;
        }
View Full Code Here

         * @param original configuration strategy to be copied.
         */
        private State(JerseyClient client, State original) {
            this.client = client;
            this.strategy = IDENTITY;
            this.commonConfig = new CommonConfig(original.commonConfig);
            this.connector = original.connector;
        }
View Full Code Here

            markAsShared();

            final ServiceLocator locator = Injections.createLocator(new ClientBinder());
            locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME);

            final CommonConfig runtimeConfig = new CommonConfig(this.commonConfig);

            // AutoDiscoverable.
            if (!PropertiesHelper.getValue(runtimeConfig.getProperties(), RuntimeType.CLIENT,
                    CommonProperties.FEATURE_AUTO_DISCOVERY_DISABLE, Boolean.FALSE, Boolean.class)) {
                runtimeConfig.configureAutoDiscoverableProviders(locator);
            }

            // Configure binders and features.
            runtimeConfig.configureMetaProviders(locator);

            // Bind configuration.
            final ExtendedConfig configuration = runtimeConfig.getConfiguration();
            final AbstractBinder configBinder = new AbstractBinder() {
                @Override
                protected void configure() {
                    bind(configuration).to(Configuration.class);
                }
            };
            final DynamicConfiguration dc = Injections.getConfiguration(locator);
            configBinder.bind(dc);
            dc.commit();

            // Bind providers.
            ProviderBinder.bindProviders(runtimeConfig.getComponentBag(), RuntimeType.CLIENT, null, locator);

            final ClientRuntime crt = new ClientRuntime(configuration, connector, locator);
            client.addListener(new JerseyClient.LifecycleListener() {
                @Override
                public void onClose() {
View Full Code Here

         *
         * @param client bound parent Jersey client.
         */
        State(JerseyClient client) {
            this.strategy = IDENTITY;
            this.commonConfig = new CommonConfig(RuntimeType.CLIENT, ComponentBag.EXCLUDE_EMPTY);
            this.client = client;
            this.connectorProvider = new HttpUrlConnectorProvider();
        }
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.model.internal.CommonConfig$FeatureRegistration

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.