List of usage examples for org.apache.http.impl.nio.reactor IOReactorConfig.Builder setSoReuseAddress
@Deprecated public void setSoReuseAddress(final boolean soReuseAddress)
From source file:org.apache.synapse.transport.utils.config.HttpTransportConfiguration.java
/** * Get the listening I/O reactor configuration * * @return A fully initialized IOReactorConfig instance *//* ww w . j ava 2 s.c o m*/ public IOReactorConfig getListeningReactorConfig() { IOReactorConfig.Builder builder = IOReactorConfig.custom().setIoThreadCount(getThreadsPerReactor()) .setSoTimeout(getIntProperty(HttpConfigConstants.LISTENER_SO_TIMEOUT, getIntProperty(HttpConfigConstants.SO_TIMEOUT, 60000))) .setConnectTimeout(getIntProperty(HttpConfigConstants.CONNECTION_TIMEOUT, 0)) .setInterestOpQueued(getBooleanProperty(HttpConfigConstants.INTEREST_OPS_QUEUEING, false)) .setTcpNoDelay(getBooleanProperty(HttpConfigConstants.TCP_NODELAY, true)); if (getIntProperty(HttpConfigConstants.SOCKET_RCV_BUFFER_SIZE) != null) { builder.setRcvBufSize(getIntProperty(HttpConfigConstants.SOCKET_RCV_BUFFER_SIZE)); } if (getIntProperty(HttpConfigConstants.SOCKET_SND_BUFFER_SIZE) != null) { builder.setSndBufSize(getIntProperty(HttpConfigConstants.SOCKET_SND_BUFFER_SIZE)); } if (getIntProperty(HttpConfigConstants.SO_LINGER) != null) { builder.setSoLinger(getIntProperty(HttpConfigConstants.SO_LINGER)); } if (getBooleanProperty(HttpConfigConstants.SO_REUSEADDR) != null) { builder.setSoReuseAddress(getBooleanProperty(HttpConfigConstants.SO_REUSEADDR)); } if (getIntProperty(HttpConfigConstants.SELECT_INTERVAL) != null) { builder.setSelectInterval(getIntProperty(HttpConfigConstants.SELECT_INTERVAL)); } return builder.build(); }
From source file:org.apache.synapse.transport.utils.config.HttpTransportConfiguration.java
/** * Get the connecting I/O reactor configuration * * @return A fully initialized IOReactorConfig instance */// ww w .j a v a 2 s. co m public IOReactorConfig getConnectingReactorConfig() { IOReactorConfig.Builder builder = IOReactorConfig.custom().setIoThreadCount(getThreadsPerReactor()) .setSoTimeout(getIntProperty(HttpConfigConstants.SENDER_SO_TIMEOUT, getIntProperty(HttpConfigConstants.SO_TIMEOUT, 60000))) .setConnectTimeout(getIntProperty(HttpConfigConstants.CONNECTION_TIMEOUT, 0)) .setInterestOpQueued(getBooleanProperty(HttpConfigConstants.INTEREST_OPS_QUEUEING, false)) .setTcpNoDelay(getBooleanProperty(HttpConfigConstants.TCP_NODELAY, true)); if (getIntProperty(HttpConfigConstants.SOCKET_RCV_BUFFER_SIZE) != null) { builder.setRcvBufSize(getIntProperty(HttpConfigConstants.SOCKET_RCV_BUFFER_SIZE)); } if (getIntProperty(HttpConfigConstants.SOCKET_SND_BUFFER_SIZE) != null) { builder.setSndBufSize(getIntProperty(HttpConfigConstants.SOCKET_SND_BUFFER_SIZE)); } if (getIntProperty(HttpConfigConstants.SO_LINGER) != null) { builder.setSoLinger(getIntProperty(HttpConfigConstants.SO_LINGER)); } if (getBooleanProperty(HttpConfigConstants.SO_REUSEADDR) != null) { builder.setSoReuseAddress(getBooleanProperty(HttpConfigConstants.SO_REUSEADDR)); } if (getIntProperty(HttpConfigConstants.SELECT_INTERVAL) != null) { builder.setSelectInterval(getIntProperty(HttpConfigConstants.SELECT_INTERVAL)); } return builder.build(); }