public < T > CompletableFuture < T > submit ( Command < T > command ) { State state = state ( ) ; if ( state == State . CLOSED || state == State . EXPIRED ) { return Futures . exceptionalFuture ( new ClosedSessionException ( "session closed" ) ) ; } return submitter . submit ( command ) ; }
Submits a command to the session .