protected void obtainProducerEndpoints ( List < Node > nodes , List < EndpointInfo > endpoints , Map < String , EndpointInfo > map ) { for ( int i = 0 ; i < nodes . size ( ) ; i ++ ) { Node node = nodes . get ( i ) ; if ( node instanceof Producer ) { String endpoint = EndpointUtil . encodeEndpoint ( node . getUri ( ) , node . getOperation ( ) ) ; if ( ! map . containsKey ( endpoint ) ) { EndpointInfo info = new EndpointInfo ( ) ; info . setEndpoint ( endpoint ) ; info . setType ( ( ( Producer ) node ) . getEndpointType ( ) ) ; endpoints . add ( info ) ; map . put ( endpoint , info ) ; } } if ( node instanceof ContainerNode ) { obtainProducerEndpoints ( ( ( ContainerNode ) node ) . getNodes ( ) , endpoints , map ) ; } } }
This method collects the information regarding endpoints for contained producers .