ReadThrottleFilterBuilder readfilter = new ReadThrottleFilterBuilder();
readfilter.setMaximumConnectionBufferSize(Integer.parseInt(System.getProperty(
ClientProperties.READ_BUFFER_LIMIT_PROP_NAME, ClientProperties.READ_BUFFER_LIMIT_DEFAULT)));
readfilter.attach(chain);
WriteBufferLimitFilterBuilder writefilter = new WriteBufferLimitFilterBuilder();
writefilter.setMaximumConnectionBufferSize(Integer.parseInt(System.getProperty(
ClientProperties.WRITE_BUFFER_LIMIT_PROP_NAME, ClientProperties.WRITE_BUFFER_LIMIT_DEFAULT)));
writefilter.attach(chain);
session.getFilterChain().remove("tempExecutorFilterForFilterBuilder");
_logger.info("Using IO Read/Write Filter Protection");
}
catch (Exception e)