Package org.eclipse.ecf.provider.dnssd
Class DnsSdDiscoveryAdvertiser
- java.lang.Object
- 
- org.eclipse.ecf.core.AbstractContainer
- 
- org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter
- 
- org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryContainerAdapter
- 
- org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryAdvertiser
 
 
 
 
- 
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable,- IContainer,- IIdentifiable,- IDiscoveryAdvertiser,- IDiscoveryLocator
 
 public class DnsSdDiscoveryAdvertiser extends DnsSdDiscoveryContainerAdapter 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryContainerAdapterDnsSdDiscoveryContainerAdapter.SRVRecordComparator
 
- 
 - 
Field Summary- 
Fields inherited from class org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryContainerAdapterresolver, targetID
 - 
Fields inherited from class org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapterallServiceListeners, serviceListeners, servicesNamespaceName, serviceTypeListeners
 - 
Fields inherited from interface org.eclipse.ecf.discovery.IDiscoveryAdvertiserCONTAINER_NAME
 - 
Fields inherited from interface org.eclipse.ecf.discovery.IDiscoveryLocatorCONTAINER_NAME
 
- 
 - 
Constructor SummaryConstructors Constructor Description DnsSdDiscoveryAdvertiser()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect(ID aTargetID, IConnectContext connectContext)Connect to a target remote process or process group.protected CollectiongetAuthoritativeNameServer(org.xbill.DNS.Name zone)StringgetContainerName()protected String[]getRegistrationDomains(IServiceTypeID aServiceTypeId)protected CollectiongetUpdateDomain(org.xbill.DNS.Name zone)IServiceInfo[]purgeCache()Purges the underlying IServiceInfo cache if available in the current providervoidregisterService(IServiceInfo serviceInfo)Register the given service.protected voidsendToServer(IServiceInfo serviceInfo, boolean mode)voidunregisterAllServices()Unregister all previously registered service.voidunregisterService(IServiceInfo serviceInfo)Unregister a previously registered service defined by serviceInfo.- 
Methods inherited from class org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryContainerAdapterdisconnect, getBrowsingOrRegistrationDomains, getConnectedID, getRecords, getSearchPath, getServiceInfo, getServices, getServices, getServiceTypes, getSRVRecord, getSRVRecords, getSRVRecords, setResolver, setSearchPath, setTsigKey
 - 
Methods inherited from class org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapteraddServiceListener, addServiceListener, addServiceTypeListener, clearListeners, dispose, fireServiceDiscovered, fireServiceTypeDiscovered, fireServiceUndiscovered, getAsyncServiceInfo, getAsyncServices, getAsyncServices, getAsyncServiceTypes, getConfig, getConnectNamespace, getID, getListeners, getServiceEvent, getServicesNamespace, removeServiceListener, removeServiceListener, removeServiceTypeListener
 - 
Methods inherited from class org.eclipse.ecf.core.AbstractContaineraddListener, fireContainerEvent, getAdapter, getPasswordFromConnectContext, removeListener
 
- 
 
- 
- 
- 
Method Detail- 
registerServicepublic void registerService(IServiceInfo serviceInfo) Description copied from interface:IDiscoveryAdvertiserRegister the given service. This publishes the service defined by the serviceInfo to the underlying publishing mechanism- Specified by:
- registerServicein interface- IDiscoveryAdvertiser
- Overrides:
- registerServicein class- DnsSdDiscoveryContainerAdapter
- Parameters:
- serviceInfo- IServiceInfo of the service to be published. Must not be- null.
 
 - 
unregisterServicepublic void unregisterService(IServiceInfo serviceInfo) Description copied from interface:IDiscoveryAdvertiserUnregister a previously registered service defined by serviceInfo.- Specified by:
- unregisterServicein interface- IDiscoveryAdvertiser
- Overrides:
- unregisterServicein class- DnsSdDiscoveryContainerAdapter
- Parameters:
- serviceInfo- IServiceInfo defining the service to unregister. Must not be- null.
 
 - 
unregisterAllServicespublic void unregisterAllServices() Description copied from interface:IDiscoveryAdvertiserUnregister all previously registered service.- Specified by:
- unregisterAllServicesin interface- IDiscoveryAdvertiser
- Overrides:
- unregisterAllServicesin class- AbstractDiscoveryContainerAdapter
- See Also:
- IDiscoveryAdvertiser.unregisterAllServices()
 
 - 
purgeCachepublic IServiceInfo[] purgeCache() Description copied from interface:IDiscoveryLocatorPurges the underlying IServiceInfo cache if available in the current provider- Specified by:
- purgeCachein interface- IDiscoveryLocator
- Overrides:
- purgeCachein class- AbstractDiscoveryContainerAdapter
- Returns:
- The previous cache content
- See Also:
- IDiscoveryLocator.purgeCache()
 
 - 
connectpublic void connect(ID aTargetID, IConnectContext connectContext) throws ContainerConnectException 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 interface- IContainer
- Specified by:
- connectin 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- nullif 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.
 
 - 
sendToServerprotected void sendToServer(IServiceInfo serviceInfo, boolean mode) 
 - 
getUpdateDomainprotected Collection getUpdateDomain(org.xbill.DNS.Name zone) throws org.xbill.DNS.TextParseException - Throws:
- org.xbill.DNS.TextParseException
 
 - 
getAuthoritativeNameServerprotected Collection getAuthoritativeNameServer(org.xbill.DNS.Name zone) throws org.xbill.DNS.TextParseException - Throws:
- org.xbill.DNS.TextParseException
 
 - 
getRegistrationDomainsprotected String[] getRegistrationDomains(IServiceTypeID aServiceTypeId) 
 - 
getContainerNamepublic String getContainerName() - Specified by:
- getContainerNamein class- AbstractDiscoveryContainerAdapter
- Returns:
- The name of this discovery container
 
 
- 
 
-