ServiceRefAmp lookup ( String path , PodRef podCaller ) { if ( _linkServiceRef . address ( ) . startsWith ( "local:" ) ) { int p = path . indexOf ( ' ' , 1 ) ; if ( p > 0 ) { // champ path is /pod.0/path // return (ServiceRefAmp) _champService.lookup(path); return ( ServiceRefAmp ) _rampManager . service ( path . substring ( p ) ) ; } else { return ( ServiceRefAmp ) _rampManager . service ( path ) ; //return (ServiceRefAmp) _rampManager.lookup("local://"); } } else { ServiceRefAmp linkRef = getLinkServiceRef ( podCaller ) ; return linkRef . onLookup ( path ) ; } }
Lookup returns a ServiceRef for the foreign path and calling pod .