getState

Current TerminalState.

Remote connections make a fresh call to the terminal unless already disconnected; failures are reported as TerminalState.DISCONNECTED instead of throwing. Instances before connect and after disconnect return the last cached state.