public Observable < Void > execute ( final I request , final O response , C keyEvaluationContext ) { final ExecutionContext context = new ExecutionContext ( request , keyEvaluationContext ) ; InboundInterceptor < I , O > nextIn = context . nextIn ( request ) ; Observable < Void > startingPoint ; if ( null != nextIn ) { startingPoint = nextIn . in ( request , response ) ; } else if ( context . invokeRouter ( ) ) { startingPoint = router . handle ( request , response ) ; } else { return Observable . error ( new IllegalStateException ( "No router defined." ) ) ; // No router defined. } return startingPoint . lift ( new Observable . Operator < Void , Void > ( ) { @ Override public Subscriber < ? super Void > call ( Subscriber < ? super Void > child ) { SerialSubscription subscription = new SerialSubscription ( ) ; ChainSubscriber chainSubscriber = new ChainSubscriber ( subscription , context , request , response , child ) ; subscription . set ( chainSubscriber ) ; child . add ( subscription ) ; return chainSubscriber ; } } ) ; }
Executes the interceptor chain for the passed request and response .