/** * <p> * Create an instance of JmDNS. * </p> * <p> * <b>Note:</b> This is a convenience method. The preferred constructor is {@link #create(InetAddress, String)}.<br/> * Check that your platform correctly handle the default localhost IP address and the local hostname. In doubt use the explicit constructor.<br/> * This call is equivalent to <code>create(null, null)</code>. * </p> * * @see #create(InetAddress, String) * @return jmDNS instance * @exception IOException * if an exception occurs during the socket creation */ public static JmDNS create() throws IOException { return new JmDNSImpl(null, null); }
/** * <p> * Create an instance of JmDNS. * </p> * <p> * <b>Note:</b> This is a convenience method. The preferred constructor is {@link #create(InetAddress, String)}.<br/> * Check that your platform correctly handle the default localhost IP address and the local hostname. In doubt use the explicit constructor.<br/> * This call is equivalent to <code>create(null, name)</code>. * </p> * * @see #create(InetAddress, String) * @param name * name of the newly created JmDNS * @return jmDNS instance * @exception IOException * if an exception occurs during the socket creation */ public static JmDNS create(final String name) throws IOException { return new JmDNSImpl(null, name); }
/** * <p> * Create an instance of JmDNS. * </p> * <p> * <b>Note:</b> This is a convenience method. The preferred constructor is {@link #create(InetAddress, String)}.<br/> * Check that your platform correctly handle the default localhost IP address and the local hostname. In doubt use the explicit constructor.<br/> * This call is equivalent to <code>create(null, null)</code>. * </p> * * @see #create(InetAddress, String) * @return jmDNS instance * @exception IOException * if an exception occurs during the socket creation */ public static JmDNS create() throws IOException { return new JmDNSImpl(null, null); }
/** * <p> * Create an instance of JmDNS. * </p> * <p> * <b>Note:</b> This is a convenience method. The preferred constructor is {@link #create(InetAddress, String)}.<br/> * Check that your platform correctly handle the default localhost IP address and the local hostname. In doubt use the explicit constructor.<br/> * This call is equivalent to <code>create(null, null)</code>. * </p> * * @see #create(InetAddress, String) * @return jmDNS instance * @exception IOException * if an exception occurs during the socket creation */ public static JmDNS create() throws IOException { return new JmDNSImpl(null, null); }
/** * <p> * Create an instance of JmDNS. * </p> * <p> * <b>Note:</b> This is a convenience method. The preferred constructor is {@link #create(InetAddress, String)}.<br/> * Check that your platform correctly handle the default localhost IP address and the local hostname. In doubt use the explicit constructor.<br/> * This call is equivalent to <code>create(null, null)</code>. * </p> * * @see #create(InetAddress, String) * @return jmDNS instance * @exception IOException * if an exception occurs during the socket creation */ public static JmDNS create() throws IOException { return new JmDNSImpl(null, null); }
/** * <p> * Create an instance of JmDNS and bind it to a specific network interface given its IP-address. * </p> * <p> * <b>Note:</b> This is a convenience method. The preferred constructor is {@link #create(InetAddress, String)}.<br/> * Check that your platform correctly handle the default localhost IP address and the local hostname. In doubt use the explicit constructor.<br/> * This call is equivalent to <code>create(addr, null)</code>. * </p> * * @see #create(InetAddress, String) * @param addr * IP address to bind to. * @return jmDNS instance * @exception IOException * if an exception occurs during the socket creation */ public static JmDNS create(final InetAddress addr) throws IOException { return new JmDNSImpl(addr, null); }
/** * <p> * Create an instance of JmDNS and bind it to a specific network interface given its IP-address. * </p> * <p> * <b>Note:</b> This is a convenience method. The preferred constructor is {@link #create(InetAddress, String)}.<br/> * Check that your platform correctly handle the default localhost IP address and the local hostname. In doubt use the explicit constructor.<br/> * This call is equivalent to <code>create(addr, null)</code>. * </p> * * @see #create(InetAddress, String) * @param addr * IP address to bind to. * @return jmDNS instance * @exception IOException * if an exception occurs during the socket creation */ public static JmDNS create(final InetAddress addr) throws IOException { return new JmDNSImpl(addr, null); }
/** * <p> * Create an instance of JmDNS. * </p> * <p> * <b>Note:</b> This is a convenience method. The preferred constructor is {@link #create(InetAddress, String)}.<br/> * Check that your platform correctly handle the default localhost IP address and the local hostname. In doubt use the explicit constructor.<br/> * This call is equivalent to <code>create(null, name)</code>. * </p> * * @see #create(InetAddress, String) * @param name * name of the newly created JmDNS * @return jmDNS instance * @exception IOException * if an exception occurs during the socket creation */ public static JmDNS create(final String name) throws IOException { return new JmDNSImpl(null, name); }
/** * <p> * Create an instance of JmDNS. * </p> * <p> * <b>Note:</b> This is a convenience method. The preferred constructor is {@link #create(InetAddress, String)}.<br/> * Check that your platform correctly handle the default localhost IP address and the local hostname. In doubt use the explicit constructor.<br/> * This call is equivalent to <code>create(null, name)</code>. * </p> * * @see #create(InetAddress, String) * @param name * name of the newly created JmDNS * @return jmDNS instance * @exception IOException * if an exception occurs during the socket creation */ public static JmDNS create(final String name) throws IOException { return new JmDNSImpl(null, name); }
/** * <p> * Create an instance of JmDNS and bind it to a specific network interface given its IP-address. * </p> * <p> * <b>Note:</b> This is a convenience method. The preferred constructor is {@link #create(InetAddress, String)}.<br/> * Check that your platform correctly handle the default localhost IP address and the local hostname. In doubt use the explicit constructor.<br/> * This call is equivalent to <code>create(addr, null)</code>. * </p> * * @see #create(InetAddress, String) * @param addr * IP address to bind to. * @return jmDNS instance * @exception IOException * if an exception occurs during the socket creation */ public static JmDNS create(final InetAddress addr) throws IOException { return new JmDNSImpl(addr, null); }
/** * <p> * Create an instance of JmDNS. * </p> * <p> * <b>Note:</b> This is a convenience method. The preferred constructor is {@link #create(InetAddress, String)}.<br/> * Check that your platform correctly handle the default localhost IP address and the local hostname. In doubt use the explicit constructor.<br/> * This call is equivalent to <code>create(null, name)</code>. * </p> * * @see #create(InetAddress, String) * @param name * name of the newly created JmDNS * @return jmDNS instance * @exception IOException * if an exception occurs during the socket creation */ public static JmDNS create(final String name) throws IOException { return new JmDNSImpl(null, name); }
/** * <p> * Create an instance of JmDNS and bind it to a specific network interface given its IP-address. * </p> * <p> * <b>Note:</b> This is a convenience method. The preferred constructor is {@link #create(InetAddress, String)}.<br/> * Check that your platform correctly handle the default localhost IP address and the local hostname. In doubt use the explicit constructor.<br/> * This call is equivalent to <code>create(addr, null)</code>. * </p> * * @see #create(InetAddress, String) * @param addr * IP address to bind to. * @return jmDNS instance * @exception IOException * if an exception occurs during the socket creation */ public static JmDNS create(final InetAddress addr) throws IOException { return new JmDNSImpl(addr, null); }
return new JmDNSImpl(addr, name);
return new JmDNSImpl(addr, name);
return new JmDNSImpl(addr, name);
return new JmDNSImpl(addr, name);
final JmDNSImpl jmdns = new JmDNSImpl(null, null); final HostInfo hostInfo = HostInfo.newHostInfo(InetAddress.getByName("192.168.1.78"), jmdns, null); System.out.println("MDNS hostname (Bonjour): " + hostInfo.getName()); System.out.println("DNS hostname: " + hostInfo.getInetAddress().getHostName()); System.out.println("IP address: " + hostInfo.getInetAddress().getHostAddress()); jmdns.close();