Package org.eclipse.ecf.provider.dnssd
Class DnsSdDiscoveryLocator
java.lang.Object
org.eclipse.ecf.core.AbstractContainer
org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter
org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryContainerAdapter
org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryLocator
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable,IContainer,IIdentifiable,IDiscoveryAdvertiser,IDiscoveryLocator
-
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, targetIDFields inherited from class org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter
allServiceListeners, serviceListeners, servicesNamespaceName, serviceTypeListenersFields inherited from interface org.eclipse.ecf.discovery.IDiscoveryAdvertiser
CONTAINER_NAMEFields inherited from interface org.eclipse.ecf.discovery.IDiscoveryLocator
CONTAINER_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(ID aTargetID, IConnectContext connectContext) Connect to a target remote process or process group.getServiceInfo(IServiceID aServiceId) Synchronously retrieve info about the serviceSynchronously get service info about all known servicesgetServices(IServiceTypeID aServiceTypeId) Synchronously get service info about all known services of given service typeThis 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, unregisterServiceMethods inherited from class org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter
addServiceListener, addServiceListener, addServiceTypeListener, clearListeners, dispose, fireServiceDiscovered, fireServiceTypeDiscovered, fireServiceUndiscovered, getAsyncServiceInfo, getAsyncServices, getAsyncServices, getAsyncServiceTypes, getConfig, getConnectNamespace, getID, getListeners, getServiceEvent, getServicesNamespace, purgeCache, removeServiceListener, removeServiceListener, removeServiceTypeListener, unregisterAllServicesMethods inherited from class org.eclipse.ecf.core.AbstractContainer
addListener, fireContainerEvent, getAdapter, getPasswordFromConnectContext, removeListener
-
Constructor Details
-
DnsSdDiscoveryLocator
public DnsSdDiscoveryLocator()
-
-
Method Details
-
getServiceInfo
Description copied from interface:IDiscoveryLocatorSynchronously retrieve info about the service- Specified by:
getServiceInfoin interfaceIDiscoveryLocator- Overrides:
getServiceInfoin classDnsSdDiscoveryContainerAdapter- Parameters:
aServiceId- IServiceID of the service to get info about. Must not benull.- Returns:
- IServiceInfo the service info retrieved.
nullif no information retrievable.
-
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:
getServiceTypesin interfaceIDiscoveryLocator- Overrides:
getServiceTypesin classDnsSdDiscoveryContainerAdapter- Returns:
- IServiceTypeID[] the resulting array of service type IDs. Will
not be
null. May be of length 0. - See Also:
-
getServices
Description copied from interface:IDiscoveryLocatorSynchronously get service info about all known services- Specified by:
getServicesin interfaceIDiscoveryLocator- Overrides:
getServicesin classDnsSdDiscoveryContainerAdapter- Returns:
- IServiceInfo[] the resulting array of service info instances.
Will not be
null. May be of length 0.
-
getServices
Description copied from interface:IDiscoveryLocatorSynchronously get service info about all known services of given service type- Specified by:
getServicesin interfaceIDiscoveryLocator- Overrides:
getServicesin classDnsSdDiscoveryContainerAdapter- Parameters:
aServiceTypeId- IServiceTypeID defining the type of service we are interested in getting service info about. Must not benull- Returns:
- IServiceInfo[] the resulting array of service info instances.
Will not be
null. May be of length 0.
-
connect
Description copied from interface:IContainerConnect 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:
connectin interfaceIContainer- Specified by:
connectin classDnsSdDiscoveryContainerAdapter- Parameters:
aTargetID- the ID of the remote server or group to connect to. SeeIContainer.getConnectNamespace()for a explanation of the constraints upon this parameter.connectContext- any required context to allow this container to authenticate. May benullif 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
- Specified by:
getContainerNamein classAbstractDiscoveryContainerAdapter- Returns:
- The name of this discovery container
-