protected void ensureReceivable ( String activityName ) throws IOException { // TODO uudashr: do we have to use another exception for this checking? SessionState currentState = getSessionState ( ) ; if ( ! currentState . isReceivable ( ) ) { throw new IOException ( "Cannot " + activityName + " while session " + sessionId + " in state " + currentState ) ; } }
Ensure the session is receivable . If the session not receivable then an exception thrown .