private static class RegistrarImpl.Announce extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
private DatagramPacket[] |
dataPackets
Cached datagram packets
|
private String[] |
lastGroups
Groups associated with cached datagram packets
|
private LookupLocator |
lastLocator
LookupLocator associated with cached datagram packets
|
private RegistrarImpl |
reggie |
private MulticastSocket |
socket
Multicast socket to send packets on
|
Constructor and Description |
---|
Announce(RegistrarImpl reggie)
Create a daemon thread.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
announce(String[] groups)
Announce membership in the specified groups, and return false if
interrupted, otherwise return true.
|
void |
run() |
private void |
send(DatagramPacket[] packets)
Attempts to multicast the given packets on each of the configured
network interfaces.
|
private void |
send(DatagramPacket[] packets,
NetworkInterface nic,
Level failureLogLevel)
Attempts to multicast the given packets on the specified network
interface, logging failures at the given logging level.
|
private final RegistrarImpl reggie
private final MulticastSocket socket
private DatagramPacket[] dataPackets
private LookupLocator lastLocator
private String[] lastGroups
public Announce(RegistrarImpl reggie) throws IOException
IOException
private boolean announce(String[] groups)
private void send(DatagramPacket[] packets) throws InterruptedIOException
InterruptedIOException
private void send(DatagramPacket[] packets, NetworkInterface nic, Level failureLogLevel) throws InterruptedIOException
InterruptedIOException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.