InvokerRegistry.updateServerInvokerLocator(locator, externalLocator);
/** * Called by MultiplexClientInvoker.createSocket() when it finds connection is * broken and binds virtual socket group to new bind port. * <p> * @param bindPort */ protected void resetLocator(int bindPort) { this.bindPort = bindPort; InvokerLocator newLocator = new InvokerLocator(locator.getProtocol(), locator.getHost(), bindPort, locator.getPath(), locator.getParameters()); InvokerRegistry.updateServerInvokerLocator(locator, newLocator); locator = newLocator; }
InvokerRegistry.updateServerInvokerLocator(locator, newLocator); this.locator = newLocator;
protected int assignPort() throws IOException { int port; port = PortUtil.findFreePort(locator.getHost()); // re-write locator since the port is different InvokerLocator newLocator = new InvokerLocator(locator.getProtocol(), locator.getHost(), port, locator.getPath(), locator.getParameters()); // need to update the locator key used in the invoker registry InvokerRegistry.updateServerInvokerLocator(locator, newLocator); this.locator = newLocator; return port; }