@Override
    public void sessionIdle(IoSession session, IdleStatus status) throws Exception {
        com.github.ltsopensource.remoting.Channel channel = new MinaChannel(session);

        final String remoteAddress = RemotingHelper.parseChannelRemoteAddr(channel);

        if (IdleStatus.BOTH_IDLE == status) {
            LOGGER.info("{}: IDLE [{}]", sideType, remoteAddress);
            RemotingHelper.closeChannel(channel);
        }

        if (remoting.getChannelEventListener() != null) {
            RemotingEventType remotingEventType = null;
            if (IdleStatus.BOTH_IDLE == status) {
                remotingEventType = RemotingEventType.ALL_IDLE;
            } else if (IdleStatus.READER_IDLE == status) {
                remotingEventType = RemotingEventType.READER_IDLE;
            } else if (IdleStatus.WRITER_IDLE == status) {
                remotingEventType = RemotingEventType.WRITER_IDLE;
            }
            remoting.putRemotingEvent(new RemotingEvent(remotingEventType,
                    remoteAddress, channel));
        }
    }
@author Robert HG (254963746@qq.com) on 11/6/15.
lts-core/src/main/java/com/github/ltsopensource/remoting/mina/MinaHandler.java