Tabnine Logo
HostInfo.getInet4Address
Code IndexAdd Tabnine to your IDE (free)

How to use
getInet4Address
method
in
javax.jmdns.impl.HostInfo

Best Java code snippets using javax.jmdns.impl.HostInfo.getInet4Address (Showing top 4 results out of 315)

origin: org.jmdns/jmdns

/**
 * {@inheritDoc}
 */
@Override
public void registerService(ServiceInfo infoAbstract) throws IOException {
  if (this.isClosing() || this.isClosed()) {
    throw new IllegalStateException("This DNS is closed.");
  }
  final ServiceInfoImpl info = (ServiceInfoImpl) infoAbstract;
  if (info.getDns() != null) {
    if (info.getDns() != this) {
      throw new IllegalStateException("A service information can only be registered with a single instamce of JmDNS.");
    } else if (_services.get(info.getKey()) != null) {
      throw new IllegalStateException("A service information can only be registered once.");
    }
  }
  info.setDns(this);
  this.registerServiceType(info.getTypeWithSubtype());
  // bind the service to this address
  info.recoverState();
  info.setServer(_localHost.getName());
  info.addAddress(_localHost.getInet4Address());
  info.addAddress(_localHost.getInet6Address());
  this.makeServiceNameUnique(info);
  while (_services.putIfAbsent(info.getKey(), info) != null) {
    this.makeServiceNameUnique(info);
  }
  this.startProber();
  logger.debug("registerService() JmDNS registered service as {}", info);
}
origin: javax.jmdns/jmdns

info.addAddress(_localHost.getInet4Address());
info.addAddress(_localHost.getInet6Address());
origin: DeviceConnect/DeviceConnect-Android

info.addAddress(_localHost.getInet4Address());
info.addAddress(_localHost.getInet6Address());
origin: org.jenkins-ci/jmdns

/**
 * {@inheritDoc}
 */
@Override
public void registerService(ServiceInfo infoAbstract) throws IOException {
  if (this.isClosing() || this.isClosed()) {
    throw new IllegalStateException("This DNS is closed.");
  }
  final ServiceInfoImpl info = (ServiceInfoImpl) infoAbstract;
  if ((info.getDns() != null) && (info.getDns() != this)) {
    throw new IllegalStateException("This service information is already registered with another DNS.");
  }
  info.setDns(this);
  this.registerServiceType(info.getTypeWithSubtype());
  // bind the service to this address
  info.setServer(_localHost.getName());
  info.addAddress(_localHost.getInet4Address());
  info.addAddress(_localHost.getInet6Address());
  this.waitForAnnounced(DNSConstants.SERVICE_INFO_TIMEOUT);
  this.makeServiceNameUnique(info);
  while (_services.putIfAbsent(info.getKey(), info) != null) {
    this.makeServiceNameUnique(info);
  }
  this.startProber();
  info.waitForAnnounced(DNSConstants.SERVICE_INFO_TIMEOUT);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("registerService() JmDNS registered service as " + info);
  }
}
javax.jmdns.implHostInfogetInet4Address

Popular methods of HostInfo

  • getInetAddress
  • getName
  • <init>
  • advanceState
  • answers
  • associateWithTask
  • cancelState
  • closeState
  • getDNS4AddressRecord
  • getDNS4ReverseAddressRecord
  • getDNS6AddressRecord
  • getDNS6ReverseAddressRecord
  • getDNS6AddressRecord,
  • getDNS6ReverseAddressRecord,
  • getDNSAddressRecord,
  • getDNSReverseAddressRecord,
  • getInet6Address,
  • getInterface,
  • incrementHostName,
  • isAnnounced,
  • isAnnouncing

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getApplicationContext (Context)
  • putExtra (Intent)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now