Package org.apache.jackrabbit.oak.plugins.index.solr.embedded

Examples of org.apache.jackrabbit.oak.plugins.index.solr.embedded.SolrServerConfiguration$HttpConfiguration


        solrCoreName = String.valueOf(componentContext.getProperties().get(SOLR_CORE_NAME));

        solrHttpPort = Integer.valueOf(String.valueOf(componentContext.getProperties().get(SOLR_HTTP_PORT)));
        solrContext = String.valueOf(componentContext.getProperties().get(SOLR_CONTEXT));

        solrServerConfiguration = new SolrServerConfiguration(solrHome, solrConfigFile, solrCoreName).
                withHttpConfiguration(solrContext, solrHttpPort);
    }
View Full Code Here


        try
        {
            HttpWagon wagon = (HttpWagon) getWagon();
            wagon.setHttpConfiguration(
                new HttpConfiguration().setAll( new HttpMethodConfiguration().setConnectionTimeout( 500 ) ) );

            Repository testRepository = new Repository();
            Random random = new Random( );
            testRepository.setUrl( "http://localhost:" + random.nextInt( 2048 ));
View Full Code Here

        return getProtocol() + "://localhost:" + getTestRepositoryPort();
    }

    protected void setHttpHeaders( StreamingWagon wagon, Properties properties )
    {
        HttpConfiguration config = new HttpConfiguration();

        HttpMethodConfiguration methodConfiguration = new HttpMethodConfiguration();
        methodConfiguration.setHeaders( properties );
        config.setAll( methodConfiguration );
        ( (HttpWagon) wagon ).setHttpConfiguration( config );
    }
View Full Code Here

    public void testSetPreemptiveAuthParamViaConfig()
    {
        HttpMethodConfiguration methodConfig = new HttpMethodConfiguration();
        //X TODO methodConfig.addParam( HttpClientParams.PREEMPTIVE_AUTHENTICATION, "%b,true" );

        HttpConfiguration config = new HttpConfiguration();
        config.setAll( methodConfig );

        TestWagon wagon = new TestWagon();
        wagon.setHttpConfiguration( config );

        HttpHead method = new HttpHead();
View Full Code Here

    {
        HttpMethodConfiguration methodConfig = new HttpMethodConfiguration();
        int maxRedirects = 2;
        methodConfig.addParam( ClientPNames.MAX_REDIRECTS, "%i," + maxRedirects );

        HttpConfiguration config = new HttpConfiguration();
        config.setAll( methodConfig );

        TestWagon wagon = new TestWagon();
        wagon.setHttpConfiguration( config );

        HttpHead method = new HttpHead();
View Full Code Here

        assertEquals( maxRedirects, params.getIntParameter( ClientPNames.MAX_REDIRECTS, -1 ) );
    }

    public void testDefaultHeadersUsedByDefault()
    {
        HttpConfiguration config = new HttpConfiguration();
        config.setAll( new HttpMethodConfiguration() );

        TestWagon wagon = new TestWagon();
        wagon.setHttpConfiguration( config );

        HttpHead method = new HttpHead();
View Full Code Here

        assertEquals( "gzip", header.getValue() );
    }

    public void testTurnOffDefaultHeaders()
    {
        HttpConfiguration config = new HttpConfiguration();
        config.setAll( new HttpMethodConfiguration().setUseDefaultHeaders( false ) );

        TestWagon wagon = new TestWagon();
        wagon.setHttpConfiguration( config );

        HttpHead method = new HttpHead();
View Full Code Here

    protected Wagon getWagon()
        throws Exception
    {
        HttpWagon wagon = (HttpWagon) super.getWagon();
        wagon.setHttpConfiguration(
            new HttpConfiguration().setAll( new HttpMethodConfiguration().setUsePreemptive( true ) ) );
        return wagon;
    }
View Full Code Here

        return getProtocol() + "://localhost:" + getTestRepositoryPort();
    }

    protected void setHttpHeaders( StreamingWagon wagon, Properties properties )
    {
        HttpConfiguration config = new HttpConfiguration();

        HttpMethodConfiguration methodConfiguration = new HttpMethodConfiguration();
        methodConfiguration.setHeaders( properties );
        config.setAll( methodConfiguration );
        ( (HttpWagon) wagon ).setHttpConfiguration( config );
    }
View Full Code Here

    protected Wagon getWagon()
        throws Exception
    {
        HttpWagon wagon = (HttpWagon) super.getWagon();
        wagon.setHttpConfiguration(
            new HttpConfiguration().setAll( new HttpMethodConfiguration().setUsePreemptive( true ) ) );
        return wagon;
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.index.solr.embedded.SolrServerConfiguration$HttpConfiguration

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.