class NetworkReceiver implements MessageSource, Lifecycle {

    URI getURI( InetSocketAddress socketAddress )
    {
        String uri;

        InetAddress address = socketAddress.getAddress();

        if ( address instanceof Inet6Address )
        {
            uri = CLUSTER_SCHEME + "://" + wrapAddressForIPv6Uri( address.getHostAddress() ) + ":" + socketAddress.getPort();
        }
        else if ( address instanceof Inet4Address )
        {
            uri = CLUSTER_SCHEME + "://" + address.getHostAddress() + ":" + socketAddress.getPort();
        }
        else
        {
            throw new IllegalArgumentException( "Address type unknown" );
        }

        // Add name if given
        if ( config.name() != null )
        {
            uri += "/?name=" + config.name();
        }

        return URI.create( uri );
    }

    public  NetworkReceiver( Monitor monitor, Configuration config, LogProvider logProvider );

}