private void initializeRouterStubs() {
PhysicalAddress physical_addr=(PhysicalAddress)down_prot.down(new Event(Event.GET_PHYSICAL_ADDRESS, local_addr));
if (gossip_hosts != null) {
for (InetSocketAddress host : gossip_hosts) {
RouterStub rs = new RouterStub(host.getHostName(), host.getPort(), null, physical_addr);
rs.setSocketConnectionTimeout(socket_conn_timeout);
rs.setSocketReadTimeout(socket_read_timeout);
clients.add(rs);
}
} else if (gossip_host != null && gossip_port != 0) {
RouterStub rs = new RouterStub(gossip_host, gossip_port, null,physical_addr);
rs.setSocketConnectionTimeout(socket_conn_timeout);
rs.setSocketReadTimeout(socket_read_timeout);
clients.add(rs);
}
}