Examples of leaveGroup()


Examples of com.linkedin.databus.groupleader.pub.GroupLeadershipSession.leaveGroup()

        catch (IllegalStateException e)
        {
          // expected
        }

        sess003.leaveGroup();
        sess001.leaveGroup();
        conn003.close();
        conn002.close();
        conn001.close();
      } finally {
View Full Code Here

Examples of io.netty.channel.socket.DatagramChannel.leaveGroup()

        sc.writeAndFlush(new DatagramPacket(Unpooled.copyInt(1), groupAddress)).sync();
        assertTrue(mhandler.await());

        // leave the group
        cc.leaveGroup(groupAddress, NetUtil.LOOPBACK_IF).sync();

        // sleep a second to make sure we left the group
        Thread.sleep(1000);

        // we should not receive a message anymore as we left the group before
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

         */
        @Override
        public void drop() throws IOException {
            mcastKeys.remove(this);
            MulticastSocket msocket = (MulticastSocket) channel.socket();
            msocket.leaveGroup(mcastaddr, netIf);
        }

        /**
         * {@inheritDoc}
         * <p>
 
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

        socket.receive(recvDatagram);
        assertEquals("Received message was not truncated", 1,
                recvDatagram.getLength());
        assertSame("Received message is invalid", sendData[0], recvData[0]);

        socket.leaveGroup(group);
        socket.close();
    }

    /**
   * @tests java.net.DatagramSocket#send(java.net.DatagramPacket)
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

        //String[] data = received.split(",");
        //int numFiles = new Integer(data[1]).intValue();
        peerGroup.notifyOccurred(pulseIn, pulseMonitorConsole);
       
    }
    multiSocket.leaveGroup(group);
    pulseMonitorConsole.log("Thread: " + this.getName() + " - Departed Multicast Socket Group");
    multiSocket.close();
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

        else
        {
            inetAddress = InetAddress.getByName(host);
        }
        MulticastSocket socket = (MulticastSocket)object;
        socket.leaveGroup(inetAddress);
        super.destroyObject(key, object);
    }

    protected DatagramSocket createSocket() throws IOException
    {
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

            Properties.MultiCastPort);
        s.joinGroup(group);
        DatagramPacket hi = new DatagramPacket(Key.getBytes(), Key
            .length(), group, Properties.MultiCastPort);
        s.send(hi);
        s.leaveGroup(group);
        s.close();
        logWriter.Info("sync cache information successfully (" + Key + ") ");
      } catch (Exception ex) {
        logWriter.Error("sync cache information failure (" + Key + ") " + ex.toString());
      }
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

                    DatagramPacket pack = new DatagramPacket(buf, buf.length);
                    s.receive(pack);
                    System.out.println("Received data from: " + pack.getAddress().toString() +
                                       ":" + pack.getPort() + " with length: " +
                                       pack.getLength());
                    s.leaveGroup(InetAddress.getByName(group));
                    s.close();
                    canRunTests = true;
                } catch (Exception e) {
                    e.printStackTrace();
                    canRunTests = false;
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

          String received = new String(packet.getData());
          System.out.println("Ping recibido: " + received);
         
          managePing(received);
      }
      socket.leaveGroup(group);
      socket.close();
    }
    catch (IOException e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

        socket.receive(recvDatagram);
        assertEquals("Received message was not truncated", 1,
                recvDatagram.getLength());
        assertSame("Received message is invalid", sendData[0], recvData[0]);

        socket.leaveGroup(group);
        socket.close();
    }

    /**
   * @tests java.net.DatagramSocket#send(java.net.DatagramPacket)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.