Example usage for org.apache.http.impl.nio.reactor IOReactorConfig getIoThreadCount

List of usage examples for org.apache.http.impl.nio.reactor IOReactorConfig getIoThreadCount

Introduction

In this page you can find the example usage for org.apache.http.impl.nio.reactor IOReactorConfig getIoThreadCount.

Prototype

public int getIoThreadCount() 

Source Link

Document

Determines the number of I/O dispatch threads to be used by the I/O reactor.

Usage

From source file:org.apache.synapse.transport.passthru.config.BaseConfigurationTest.java

@Test
public void testBuildIOReactorConfig() throws Exception {
    IOReactorConfig config = baseConfiguration.buildIOReactorConfig();
    int expectedIOThreadCount = Runtime.getRuntime().availableProcessors();
    Assert.assertNotNull("I/O Reactor hasn't been initialized.", config);
    Assert.assertEquals("I/O reactor thread count isn't correct.", expectedIOThreadCount,
            config.getIoThreadCount());
}

From source file:org.apache.synapse.transport.passthru.config.SourceConfigurationTest.java

@Test
public void testGetIOReactorConfig() throws Exception {
    IOReactorConfig config = sourceConfiguration.getIOReactorConfig();
    int expectedIOThreadCount = Runtime.getRuntime().availableProcessors();
    Assert.assertNotNull("I/O Reactor hasn't been initialized.", config);
    Assert.assertEquals("I/O reactor thread count isn't correct.", expectedIOThreadCount,
            config.getIoThreadCount());
}