code: int getState() {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "getState");
          int currentState;
  
          synchronized (stateLock) {
              currentState = state;
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(this, tc, "getState", currentState);
          return currentState;
      }
docs: Get the state of the session (stopped, started or closed).