@Override
public void start(StartContext context) throws StartException {
// get the remoting server (which allows remoting connector to connect to it) service
final ServiceContainer serviceContainer = context.getController().getServiceContainer();
final ServiceController streamServerServiceController = serviceContainer.getRequiredService(this.remotingConnectorServiceName);
final AbstractStreamServerService streamServerService = (AbstractStreamServerService) streamServerServiceController.getService();
// we can only work off a remoting connector which is backed by a socket binding
if (streamServerService instanceof InjectedSocketBindingStreamServerService) {
this.remotingServer = (InjectedSocketBindingStreamServerService) streamServerService;
}
}