for (TransportConfiguration tc : connectors) {
// If there is a socket binding set the HOST/PORT values
Object socketRef = tc.getParams().remove(SOCKET_REF);
if (socketRef != null) {
String name = socketRef.toString();
SocketBinding binding = socketBindings.get(name);
if (binding == null) {
throw new StartException("Failed to find SocketBinding for connector: " + tc.getName());
}
tc.getParams().put(HOST, binding.getSocketAddress().getHostName());
tc.getParams().put(PORT, "" + binding.getSocketAddress().getPort());
}
}
}
if (acceptors != null) {
for (TransportConfiguration tc : acceptors) {
// If there is a socket binding set the HOST/PORT values
Object socketRef = tc.getParams().remove(SOCKET_REF);
if (socketRef != null) {
String name = socketRef.toString();
SocketBinding binding = socketBindings.get(name);
if (binding == null) {
throw new StartException("Failed to find SocketBinding for connector: " + tc.getName());
}
tc.getParams().put(HOST, binding.getSocketAddress().getHostName());
tc.getParams().put(PORT, "" + binding.getSocketAddress().getPort());
}
}
}
// Now start the server