org.eclipse.ecf.provider.dnssd
Class DnsSdDiscoveryLocator

java.lang.Object
  extended by org.eclipse.ecf.core.AbstractContainer
      extended by org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter
          extended by org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryContainerAdapter
              extended by org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryLocator
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IContainer, IIdentifiable, IDiscoveryAdvertiser, IDiscoveryLocator

public class DnsSdDiscoveryLocator
extends DnsSdDiscoveryContainerAdapter


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryContainerAdapter
DnsSdDiscoveryContainerAdapter.SRVRecordComparator
 
Field Summary
 
Fields inherited from class org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryContainerAdapter
resolver, targetID
 
Fields inherited from class org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter
allServiceListeners, serviceListeners, servicesNamespaceName, serviceTypeListeners
 
Fields inherited from interface org.eclipse.ecf.discovery.IDiscoveryLocator
CONTAINER_NAME
 
Fields inherited from interface org.eclipse.ecf.discovery.IDiscoveryAdvertiser
CONTAINER_NAME
 
Constructor Summary
DnsSdDiscoveryLocator()
           
 
Method Summary
 void connect(ID aTargetID, IConnectContext connectContext)
          Connect to a target remote process or process group.
 java.lang.String getContainerName()
           
 IServiceInfo getServiceInfo(IServiceID aServiceId)
          Synchronously retrieve info about the service
 IServiceInfo[] getServices()
          Synchronously get service info about all known services
 IServiceInfo[] getServices(IServiceTypeID aServiceTypeId)
          Synchronously get service info about all known services of given service type
 IServiceTypeID[] getServiceTypes()
          This always returns the service type found for our local domain Use org.eclipse.ecf.provider.dnssrv.DnsSrvDisocoveryLocator.getServices(IServiceTypeID) with a wildcard query instead.
 
Methods inherited from class org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryContainerAdapter
disconnect, getBrowsingOrRegistrationDomains, getConnectedID, getRecords, getSearchPath, getSRVRecord, getSRVRecords, getSRVRecords, registerService, setResolver, setSearchPath, setTsigKey, unregisterService
 
Methods inherited from class org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter
addServiceListener, addServiceListener, addServiceTypeListener, clearListeners, dispose, fireServiceDiscovered, fireServiceTypeDiscovered, fireServiceUndiscovered, getAsyncServiceInfo, getAsyncServices, getAsyncServices, getAsyncServiceTypes, getConfig, getConnectNamespace, getID, getListeners, getServicesNamespace, purgeCache, removeServiceListener, removeServiceListener, removeServiceTypeListener, unregisterAllServices
 
Methods inherited from class org.eclipse.ecf.core.AbstractContainer
addListener, fireContainerEvent, getAdapter, getPasswordFromConnectContext, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

DnsSdDiscoveryLocator

public DnsSdDiscoveryLocator()
Method Detail

getServiceInfo

public IServiceInfo getServiceInfo(IServiceID aServiceId)
Description copied from interface: IDiscoveryLocator
Synchronously retrieve info about the service

Specified by:
getServiceInfo in interface IDiscoveryLocator
Overrides:
getServiceInfo in class DnsSdDiscoveryContainerAdapter
Returns:
IServiceInfo the service info retrieved. null if no information retrievable.

getServiceTypes

public IServiceTypeID[] getServiceTypes()
This always returns the service type found for our local domain Use org.eclipse.ecf.provider.dnssrv.DnsSrvDisocoveryLocator.getServices(IServiceTypeID) with a wildcard query instead.

Specified by:
getServiceTypes in interface IDiscoveryLocator
Overrides:
getServiceTypes in class DnsSdDiscoveryContainerAdapter
Returns:
IServiceTypeID[] the resulting array of service type IDs. Will not be null. May be of length 0.
See Also:
IDiscoveryLocator.getServiceTypes()

getServices

public IServiceInfo[] getServices()
Description copied from interface: IDiscoveryLocator
Synchronously get service info about all known services

Specified by:
getServices in interface IDiscoveryLocator
Overrides:
getServices in class DnsSdDiscoveryContainerAdapter
Returns:
IServiceInfo[] the resulting array of service info instances. Will not be null. May be of length 0.

getServices

public IServiceInfo[] getServices(IServiceTypeID aServiceTypeId)
Description copied from interface: IDiscoveryLocator
Synchronously get service info about all known services of given service type

Specified by:
getServices in interface IDiscoveryLocator
Overrides:
getServices in class DnsSdDiscoveryContainerAdapter
Returns:
IServiceInfo[] the resulting array of service info instances. Will not be null. May be of length 0.

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.

getContainerName

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