public NonBlockingReadWriteService( String _service_name, int timeout, int close_delay, ServiceListener _listener ) {
this.service_name = _service_name;
this.listener = _listener;
read_selector = new VirtualChannelSelector( service_name, VirtualChannelSelector.OP_READ, false );
write_selector = new VirtualChannelSelector( service_name, VirtualChannelSelector.OP_WRITE, true );
if( timeout < TIMEOUT_CHECK_INTERVAL_MS /1000 ) timeout = TIMEOUT_CHECK_INTERVAL_MS /1000;
this.activity_timeout_period_ms = timeout *1000;
close_delay_period_ms = close_delay * 1000;