List of usage examples for org.apache.http.impl.nio.reactor IOReactorConfig.Builder setSndBufSize
@Deprecated public void setSndBufSize(final int sndBufSize)
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 av a2 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 *///w w w.ja v a2 s .c o 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(); }