Home | History | Annotate | Download | only in channels

Lines Matching defs:networkInterface

27 import java.net.NetworkInterface;
76 private NetworkInterface ipv4NetworkInterface;
77 private NetworkInterface ipv6NetworkInterface;
78 private NetworkInterface loopbackInterface;
86 loopbackInterface = NetworkInterface.getByInetAddress(InetAddress.getLoopbackAddress());
91 Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
103 NetworkInterface nextInterface = interfaces.nextElement();
229 NetworkInterface networkInterface) throws Exception {
236 receiverChannel.join(group, networkInterface);
239 createChannelAndSendMulticastMessage(group, localAddress.getPort(), msg, networkInterface);
250 group2, localAddress.getPort(), msg2, networkInterface);
321 ArrayList<NetworkInterface> realInterfaces = new ArrayList<NetworkInterface>();
322 Enumeration<NetworkInterface> theInterfaces = NetworkInterface.getNetworkInterfaces();
324 NetworkInterface thisInterface = theInterfaces.nextElement();
331 NetworkInterface thisInterface = realInterfaces.get(i);
344 NetworkInterface sendingInterface = null;
412 NetworkInterface networkInterface) throws Exception {
418 MembershipKey membershipKey1 = dc.join(group, networkInterface);
423 MembershipKey membershipKey1_2 = dc.join(group, networkInterface);
438 NetworkInterface networkInterface) throws Exception {
446 dc.setOption(StandardSocketOptions.IP_MULTICAST_IF, networkInterface);
448 dc.join(group, networkInterface);
488 NetworkInterface networkInterface) throws Exception {
494 MembershipKey key = dc.join(group, networkInterface);
498 assertSame(networkInterface, key.networkInterface());
512 NetworkInterface networkInterface) throws Exception {
517 MembershipKey membershipKey = dc.join(group, networkInterface);
769 InetAddress groupAddress, NetworkInterface networkInterface)
786 receivingChannel.join(groupSocketAddress.getAddress(), networkInterface);
790 BindableChannel channel = new BindableChannel(sendingChannel, networkInterface);
1071 * @param networkInterface The network interface on which to join the multicast group
1075 InetAddress badSenderAddress, NetworkInterface networkInterface)
1093 .join(groupSocketAddress.getAddress(), networkInterface, senderBindAddress);
1096 BindableChannel channel = new BindableChannel(sendingChannel, networkInterface);
1106 receivingChannel.join(groupSocketAddress.getAddress(), networkInterface, badSenderAddress);
1131 NetworkInterface networkInterface)
1137 MembershipKey membershipKey = dc.join(groupAddress, networkInterface, sourceAddress);
1167 NetworkInterface networkInterface) throws Exception {
1172 MembershipKey membershipKey1 = dc.join(groupAddress, networkInterface, sourceAddress1);
1173 MembershipKey membershipKey2 = dc.join(groupAddress, networkInterface, sourceAddress2);
1210 assertSame(ipv4NetworkInterface, membershipKey.networkInterface());
1224 private static boolean willWorkForMulticast(NetworkInterface iface) throws IOException {
1233 InetAddress group, int port, String msg, NetworkInterface sendingInterface)
1243 * A {@link DatagramChannel} which is optionally bound to a {@link NetworkInterface}.
1249 * @param networkInterface The interface to bind {@code datagramChannel} to, or null to
1252 public BindableChannel(DatagramChannel datagramChannel, NetworkInterface networkInterface)
1255 if (networkInterface != null) {
1258 datagramChannel.setOption(StandardSocketOptions.IP_MULTICAST_IF, networkInterface);
1269 private static InetAddress getLocalIpv4Address(NetworkInterface networkInterface) {
1270 for (InterfaceAddress interfaceAddress : networkInterface.getInterfaceAddresses()) {
1275 throw new AssertionFailedError("Unable to find local IPv4 address for " + networkInterface);
1278 private static InetAddress getLocalIpv6Address(NetworkInterface networkInterface) {
1279 for (InterfaceAddress interfaceAddress : networkInterface.getInterfaceAddresses()) {
1284 throw new AssertionFailedError("Unable to find local IPv6 address for " + networkInterface);