code: protected void setState(int newState) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "setState", newState);
  
          synchronized (stateLock) {
              if ((newState == JmsInternalConstants.CLOSED)
                  || (newState == JmsInternalConstants.STOPPED)
                  || (newState == JmsInternalConstants.STARTED)) {
                  state = newState;
                  stateLock.notifyAll();
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(this, tc, "setState");
      }
docs: Sets the state.
  
  @param state The state to set