removeFromFutureMaps( messageId );
break;
case INTERMEDIATE_RESPONSE:
IntermediateResponse intermediateResponse = null;
if ( responseFuture instanceof SearchFuture )
{
intermediateResponse = new IntermediateResponseImpl( messageId );
addControls( intermediateResponse, ( IntermediateResponse ) response );
( ( SearchFuture ) responseFuture ).set( intermediateResponse );
}
else if ( responseFuture instanceof ExtendedFuture )
{
intermediateResponse = new IntermediateResponseImpl( messageId );
addControls( intermediateResponse, ( IntermediateResponse ) response );
( ( ExtendedFuture ) responseFuture ).set( intermediateResponse );
}
else
{
// currently we only support IR for search and extended operations
throw new UnsupportedOperationException( "Unknown ResponseFuture type "
+ responseFuture.getClass().getName() );
}
intermediateResponse.setResponseName( ( ( IntermediateResponse ) response ).getResponseName() );
intermediateResponse.setResponseValue( ( ( IntermediateResponse ) response ).getResponseValue() );
break;
case MODIFY_RESPONSE:
// Transform the response