Class DnsSdDiscoveryAdvertiser

All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IContainer, IIdentifiable, IDiscoveryAdvertiser, IDiscoveryLocator

public class DnsSdDiscoveryAdvertiser extends DnsSdDiscoveryContainerAdapter
  • Constructor Details

    • DnsSdDiscoveryAdvertiser

      public DnsSdDiscoveryAdvertiser()
  • Method Details

    • registerService

      public void registerService(IServiceInfo serviceInfo)
      Description copied from interface: IDiscoveryAdvertiser
      Register the given service. This publishes the service defined by the serviceInfo to the underlying publishing mechanism
      Specified by:
      registerService in interface IDiscoveryAdvertiser
      Overrides:
      registerService in class DnsSdDiscoveryContainerAdapter
      Parameters:
      serviceInfo - IServiceInfo of the service to be published. Must not be null.
    • unregisterService

      public void unregisterService(IServiceInfo serviceInfo)
      Description copied from interface: IDiscoveryAdvertiser
      Unregister a previously registered service defined by serviceInfo.
      Specified by:
      unregisterService in interface IDiscoveryAdvertiser
      Overrides:
      unregisterService in class DnsSdDiscoveryContainerAdapter
      Parameters:
      serviceInfo - IServiceInfo defining the service to unregister. Must not be null.
    • unregisterAllServices

      public void unregisterAllServices()
      Description copied from interface: IDiscoveryAdvertiser
      Unregister all previously registered service.
      Specified by:
      unregisterAllServices in interface IDiscoveryAdvertiser
      Overrides:
      unregisterAllServices in class AbstractDiscoveryContainerAdapter
      See Also:
    • purgeCache

      public IServiceInfo[] purgeCache()
      Description copied from interface: IDiscoveryLocator
      Purges the underlying IServiceInfo cache if available in the current provider
      Specified by:
      purgeCache in interface IDiscoveryLocator
      Overrides:
      purgeCache in class AbstractDiscoveryContainerAdapter
      Returns:
      The previous cache content
      See Also:
    • connect

      public void connect(ID aTargetID, IConnectContext connectContext) throws ContainerConnectException
      Description copied from interface: IContainer
      Connect to a target remote process or process group. The target identified by the first parameter (targetID) is connected the implementation class. If authentication information is required, the required information is given via via the second parameter (connectContext). Callers note that depending upon the provider implementation this method may block. It is suggested that callers use a separate thread to call this method. This method provides an implementation independent way for container implementations to connect, authenticate, and communicate with a remote service or group of services. Providers are responsible for implementing this operation in a way appropriate to the given remote service (or group) via expected protocol.
      Specified by:
      connect in interface IContainer
      Specified by:
      connect in class DnsSdDiscoveryContainerAdapter
      Parameters:
      aTargetID - the ID of the remote server or group to connect to. See IContainer.getConnectNamespace() for a explanation of the constraints upon this parameter.
      connectContext - any required context to allow this container to authenticate. May be null if underlying provider does not have any authentication requirements for connection.
      Throws:
      ContainerConnectException - thrown if communication cannot be established with remote service. Causes can include network connection failure, authentication failure, server error, or if container is already connected.
    • sendToServer

      protected void sendToServer(IServiceInfo serviceInfo, boolean mode)
    • getUpdateDomain

      protected Collection getUpdateDomain(org.xbill.DNS.Name zone) throws org.xbill.DNS.TextParseException
      Throws:
      org.xbill.DNS.TextParseException
    • getAuthoritativeNameServer

      protected Collection getAuthoritativeNameServer(org.xbill.DNS.Name zone) throws org.xbill.DNS.TextParseException
      Throws:
      org.xbill.DNS.TextParseException
    • getRegistrationDomains

      protected String[] getRegistrationDomains(IServiceTypeID aServiceTypeId)
    • getContainerName

      public String getContainerName()
      Specified by:
      getContainerName in class AbstractDiscoveryContainerAdapter
      Returns:
      The name of this discovery container