/** * Join the group. * * @throws Exception */ public void join() throws Exception { synchronized (this.joined) { if (!this.joined) { PipeAdvertisement pipeAdvertisment = PipeUtil.getAdvertisement(getPeerGroup(), getPeerGroup().getPeerName(), PipeService.UnicastType, null); DiscoveryService ds = getPeerGroup().getDiscoveryService(); ds.publish(pipeAdvertisment); ds.remotePublish(pipeAdvertisment); ExecutorService executors = this.networkHandler.getJXTAExecutorService(); executors.submit(new Server()); executors.submit(new PipeDiscover()); getPeerGroup().getRendezVousService().setAutoStart(true, 12000); this.joined = true; } } }