public void init() throws Exception { super.init(); stubManager = RouterStubManager.emptyGossipClientStubManager(this).useNio(this.use_nio); // we cannot use TCPGOSSIP together with TUNNEL (https://jira.jboss.org/jira/browse/JGRP-1101) TP transport=getTransport(); if(transport instanceof TUNNEL) throw new IllegalStateException("TCPGOSSIP cannot be used with TUNNEL; use either TUNNEL:PING or " + "TCP:TCPGOSSIP as valid configurations"); }
public void handleConnect() { if (cluster_name == null || local_addr == null) log.error(Util.getMessage("GroupaddrOrLocaladdrIsNullCannotRegisterWithGossipRouterS")); else { InetAddress bind_addr=getTransport().getBindAddress(); log.trace("registering " + local_addr + " under " + cluster_name + " with GossipRouter"); stubManager.destroyStubs(); PhysicalAddress physical_addr = (PhysicalAddress) down_prot.down(new Event(Event.GET_PHYSICAL_ADDRESS, local_addr)); stubManager = new RouterStubManager(this, cluster_name, local_addr, NameCache.get(local_addr), physical_addr, reconnect_interval).useNio(this.use_nio); for (InetSocketAddress host : initial_hosts) { RouterStub stub=stubManager.createAndRegisterStub(new IpAddress(bind_addr, 0), new IpAddress(host.getAddress(), host.getPort())); stub.socketConnectionTimeout(sock_conn_timeout); } stubManager.connectStubs(); } }
public void init() throws Exception { super.init(); stubManager = RouterStubManager.emptyGossipClientStubManager(this).useNio(this.use_nio); // we cannot use TCPGOSSIP together with TUNNEL (https://jira.jboss.org/jira/browse/JGRP-1101) TP transport=getTransport(); if(transport instanceof TUNNEL) throw new IllegalStateException("TCPGOSSIP cannot be used with TUNNEL; use either TUNNEL:PING or " + "TCP:TCPGOSSIP as valid configurations"); }
public void handleConnect() { if (cluster_name == null || local_addr == null) log.error(Util.getMessage("GroupaddrOrLocaladdrIsNullCannotRegisterWithGossipRouterS")); else { InetAddress bind_addr=getTransport().getBindAddress(); log.trace("registering " + local_addr + " under " + cluster_name + " with GossipRouter"); stubManager.destroyStubs(); PhysicalAddress physical_addr = (PhysicalAddress) down_prot.down(new Event(Event.GET_PHYSICAL_ADDRESS, local_addr)); stubManager = new RouterStubManager(this, cluster_name, local_addr, NameCache.get(local_addr), physical_addr, reconnect_interval).useNio(this.use_nio); for (InetSocketAddress host : initial_hosts) { RouterStub stub=stubManager.createAndRegisterStub(new IpAddress(bind_addr, 0), new IpAddress(host.getAddress(), host.getPort())); stub.socketConnectionTimeout(sock_conn_timeout); } stubManager.connectStubs(); } }