public void proxyService ( String serviceName , String contextPath ) { if ( proxiedServiceMappings ( ) . containsValue ( contextPath ) ) { throw new IllegalArgumentException ( "Cannot proxy multiple services under the same context path" ) ; } proxiedServiceMappings . put ( serviceName , contextPath ) ; }
Set up a load - balancing reverse proxy for the given service at the given context path . Requests to this proxy will be load - balanced among all instances of the service as provided by our Topology .