@Override
    public void run() {
      try {
        initialize();
        while (!stopped) {
          this.sleeper.sleep();
        }
      } catch (Exception e) {
        abort(e.getMessage(), e);
      }
      this.rpcServer.stop();
    }
Basic server process for RPC authentication testing
hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java