List of usage examples for org.apache.http.impl.nio.reactor IOReactorConfig.Builder setRcvBufSize
@Deprecated public void setRcvBufSize(final int rcvBufSize)
From source file:org.apache.synapse.transport.utils.config.HttpTransportConfiguration.java
/** * Get the listening I/O reactor configuration * * @return A fully initialized IOReactorConfig instance *//*from w w w. j a v a2 s . c om*/ 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 *//*from www . j a va2 s . com*/ 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(); }