Join a multicast group.

@param multicastAddress multicast address of the group to join

@return a {@link Publisher} that will be complete when the group has been joined
438252
@Override
	public Mono<Void> join(final InetAddress multicastAddress, NetworkInterface iface) {
		if (null == iface && null != datagramChannel.config().getNetworkInterface()) {
			iface = datagramChannel.config().getNetworkInterface();
		}

		final ChannelFuture future;
		if (null != iface) {
			future = datagramChannel.joinGroup(new InetSocketAddress(multicastAddress,
					datagramChannel.localAddress()
					               .getPort()), iface);
		}
		else {
			future = datagramChannel.joinGroup(multicastAddress);
		}

		return FutureMono.from(future)
		                 .doOnSuccess(v -> {
		                     if (log.isInfoEnabled()) {
		                         log.info(format(future.channel(), "JOIN {}"), multicastAddress);
		                     }
		                 });
	}
428166
public SentinelServersConfig addSentinelAddress(String... addresses) {
        for (String address : addresses) {
            sentinelAddresses.add(URIBuilder.create(address));
        }
        return this;
    }
1348012
private void sendAnnouncement(InetAddress broadcastAddress) {
        try {
            DatagramPacket announcement = new DatagramPacket(announcementBytes, announcementBytes.length,
                    broadcastAddress, DeviceFinder.ANNOUNCEMENT_PORT);
            socket.get().send(announcement);
            Thread.sleep(getAnnounceInterval());
        } catch (Throwable t) {
            logger.warn("Unable to send announcement packet, shutting down", t);
            stop();
        }
    }
970789
public static Completable toCompletable(Publisher<?> publisher) {
        if (publisher == null) {
            throw new NullPointerException("publisher");
        }
        return Completable.create(new PublisherAsCompletable(publisher));
    }
755054
public <T> FutureStream<T> fromPublisher(final Publisher<? extends T> publisher) {
        Objects.requireNonNull(publisher);
        Publisher<T> narrowed = (Publisher<T>)publisher;
        return fromStream(Spouts.from(narrowed));
    }
916361
public ADDRESST registerParticipant(ADDRESST address, EventListener entity) {
		synchronized (mutex()) {
			addListener(address, entity);
			this.participants.put(entity.getID(), address);
		}
		return address;
	}
592168
public static io.scalecube.transport.Address toAddress(
      io.scalecube.services.transport.api.Address address) {
    return io.scalecube.transport.Address.create(address.host(), address.port());
  }
1053485
public void join(Address logicalAddress, T physicalAddress)
   {
      if (trace)
         log.tracef("JOIN(%s, %s)", logicalAddress, physicalAddress);

      if (!nodes.containsKey(logicalAddress))
      {
         nodes.put(logicalAddress, physicalAddress);

         DistributedWorkManager dwm = workManagerCoordinator.resolveDistributedWorkManager(logicalAddress);

         if (dwm != null)
         {
            Collection<NotificationListener> copy =
               new ArrayList<NotificationListener>(dwm.getNotificationListeners());
            for (NotificationListener nl : copy)
            {
               nl.join(logicalAddress);
            }
         }
         else
         {
            WorkManagerEventQueue wmeq = WorkManagerEventQueue.getInstance();
            wmeq.addEvent(new WorkManagerEvent(WorkManagerEvent.TYPE_JOIN, logicalAddress));
         }
      }
   }
1126377
public ChannelFuture block(InetAddress multicastAddress,
                               NetworkInterface networkInterface, InetAddress sourceToBlock) {
        if (DetectionUtil.javaVersion() < 7) {
            throw new UnsupportedOperationException();
        } else {
            if (multicastAddress == null) {
                throw new NullPointerException("multicastAddress");
            }
            if (sourceToBlock == null) {
                throw new NullPointerException("sourceToBlock");
            }

            if (networkInterface == null) {
                throw new NullPointerException("networkInterface");
            }
            synchronized (this) {
                if (memberships != null) {
                    List<MembershipKey> keys = memberships.get(multicastAddress);
                    for (MembershipKey key: keys) {
                        if (networkInterface.equals(key.networkInterface())) {
                            try {
                                key.block(sourceToBlock);
                            } catch (IOException e) {
                                return failedFuture(this, e);
                            }
                        }
                    }
                }
            }
            return succeededFuture(this);
        }
    }
1103227
public ChannelFuture connect(SocketAddress remoteAddress) {
        if (remoteAddress == null) {
            throw new NullPointerException("remoteAddress");
        }

        validate();
        return doResolveAndConnect(remoteAddress, config.localAddress());
    }
401606
public void addAddress(PeerAddress peerAddress) {
        int newMax;
        lock.lock();
        try {
            if (addInactive(peerAddress)) {
                newMax = getMaxConnections() + 1;
                setMaxConnections(newMax);
            }
        } finally {
            lock.unlock();
        }
    }
1294015
public ClientNetworkConfig addAddress(String... addresses) {
        isNotNull(addresses, "addresses");
        for (String address : addresses) {
            isNotNull(address, "address");
            checkHasText(address.trim(), "member must contain text");
        }
        Collections.addAll(addressList, addresses);
        return this;
    }
35678
public IPv6AddressSegment join(IPv6AddressCreator creator, IPv4AddressSegment low) throws IncompatibleAddressException {
		int shift = IPv4Address.BITS_PER_SEGMENT;
		Integer prefix = getJoinedSegmentPrefixLength(shift, getSegmentPrefixLength(), low.getSegmentPrefixLength());
		if(isMultiple()) {
			//if the high segment has a range, the low segment must match the full range, 
			//otherwise it is not possible to create an equivalent range when joining
			if(!low.isFullRange()) {
				throw new IncompatibleAddressException(this, low, "ipaddress.error.invalidMixedRange");
			}
		}
		return creator.createSegment(
				(getSegmentValue() << shift) | low.getSegmentValue(), 
				(getUpperSegmentValue() << shift) | low.getUpperSegmentValue(),
				prefix);
	}
219498
public final TcpServer addressSupplier(Supplier<? extends SocketAddress> bindingAddressSupplier) {
		Objects.requireNonNull(bindingAddressSupplier, "bindingAddressSupplier");
		return bootstrap(b -> b.localAddress(bindingAddressSupplier.get()));
	}
761415
private void addSubscriptionsToBus(BusGroup group, String busId) 
  throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "addSubscriptionsToBus", new Object[]{group, busId});
    
    // Get the complete list of Subscriptions from the MatchSpace 
    // and assign to the BusGroup.
    final ArrayList cdList =
      _proxyHandler
        .getMessageProcessor()
        .getMessageProcessorMatching()
        .getAllCDMatchTargets();

    // Iterate through the list of available "subscriptions".   
    final Iterator cdIterator = cdList.listIterator();
    while (cdIterator.hasNext())
    {
      // Get the Consumer Dispatcher for this element.
      final ConsumerDispatcher cd = (ConsumerDispatcher) cdIterator.next();

      // This won't actually send the subscriptions to the Neighbour
      // but generates the list of topics that are to be propagated.
      group.addLocalSubscription(cd.getConsumerDispatcherState(), null, null, false);

    }

    // Add proxy subscriptions that have been registered by
    // Neighbouring ME's.
    final ArrayList phList = 
      _proxyHandler
        .getMessageProcessor()
        .getMessageProcessorMatching()
        .getAllPubSubOutputHandlerMatchTargets();
        
    final ArrayList outputSeenList = new ArrayList();
    
    final Iterator phIterator = phList.listIterator();
    while (phIterator.hasNext())
    {
      // Get the PubSub OutputHandler for this element.
      final PubSubOutputHandler oh = (PubSubOutputHandler) phIterator.next();
      
      if (!outputSeenList.contains(oh) &&
           oh.neighbourOnDifferentBus(busId))
      {
        // This won't actually send the subscriptions to the Neighbour
        // but generates the list of topics that are to be propagated.
        final String topics[] = oh.getTopics();
        final SIBUuid12 topicSpaceUuid = oh.getTopicSpaceUuid();
        
        if (topics != null && topics.length > 0)
        {
          for (int i=0; i<topics.length; i++)        
          {
            group.addRemoteSubscription(topicSpaceUuid, topics[i], null, false);             
          }
        }
        
        // Add the neighbour to the list of seen Neighbours.
        outputSeenList.add(oh);
      }      
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "addSubscriptionsToBus");
  }
537992
public static TcpServerTransport create(String bindAddress, int port) {
    Objects.requireNonNull(bindAddress, "bindAddress must not be null");

    TcpServer server = TcpServer.create().host(bindAddress).port(port);
    return create(server);
  }
700262
@Override
	public TopicPublisher createPublisher(Topic topic) throws JMSException
    {
    	externalAccessLock.readLock().lock();
    	try
		{
	        checkNotClosed();
	        
	        RemoteTopicPublisher publisher =  new RemoteTopicPublisher(this,
	                                                                   DestinationTools.asRef(topic),
	                                                                   idProvider.createID());
	        registerProducer(publisher);
	        return publisher;
		}
    	finally
    	{
    		externalAccessLock.readLock().unlock();
    	}
    }