code: public boolean isIdle() {
          long lastPingTime = lastPingSentOn.get();
          long lastPongTime = lastPongReceivedOn.get();
          boolean idle = (lastPongTime > 0 && (lastPingTime - lastPongTime > maxInactivity));
          if (log.isTraceEnabled()) {
              log.trace("Connection {} {} idle", getSessionId(), (idle ? "is" : "is not"));
          }
          return idle;
      }
docs: Returns whether or not the connection has been idle for a maximum period.
  
  @return true if max idle period has been exceeded, false otherwise