class StreamingState implements BoltStateMachineState {

    @Override
    public BoltStateMachineState process( RequestMessage message, StateMachineContext context ) throws BoltConnectionFatality
    {
        assertInitialized();
        if ( message instanceof PullAllMessage )
        {
            return processPullAllMessage( context );
        }
        if ( message instanceof DiscardAllMessage )
        {
            return processDiscardAllMessage( context );
        }
        if ( message instanceof ResetMessage )
        {
            return processResetMessage( context );
        }
        if ( message instanceof InterruptSignal )
        {
            return interruptedState;
        }
        return null;
    }

}