public Map < String , Object > injectResources ( Map < String , Object > resources ) { Map < String , Object > allResources = new HashMap <> ( resources ) ; for ( Entry < String , Transport > entry : transportsByName . entrySet ( ) ) { allResources . put ( entry . getKey ( ) + ".acceptor" , entry . getValue ( ) . getAcceptor ( ) ) ; allResources . put ( entry . getKey ( ) + ".connector" , entry . getValue ( ) . getConnector ( ) ) ; } for ( Transport transport : transportsByName . values ( ) ) { BridgeAcceptor acceptor = transport . getAcceptor ( ) ; if ( acceptor != null ) { injectResources ( acceptor , allResources ) ; } BridgeConnector connector = transport . getConnector ( ) ; if ( connector != null ) { injectResources ( transport . getConnector ( ) , allResources ) ; } for ( Object extension : transport . getExtensions ( ) ) { injectResources ( extension , allResources ) ; } } return allResources ; }
Inject the given resources plus all available transport acceptors and connectors into every available acceptor and connector .