You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Wenrui Guo <we...@ericsson.com> on 2008/07/31 08:55:53 UTC

Usage of ReadThrottleFilter

Hi, all
In order to bring flow control capability to my application, I wrote
such code lines:

		connector = new NioSocketConnector();
		connector.setConnectTimeout(connectTimeout);
		connector.getFilterChain().addLast("codec",
				new ProtocolCodecFilter(new
SMPPCodecFactory(false)));

		// >>>> please notice the following 2 lines
		connector.getFilterChain().addLast("exec", new
ExecutorFilter());
		connector.getFilterChain().addLast("throttle",
				new
ReadThrottleFilter(Executors.newScheduledThreadPool(1)));

	
connector.getSessionConfig().setBothIdleTime(bothIdleTime);

Does it can enable ReadThrottleFilter and block excessive incoming
network packets?

BR
anderson