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
-
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.protected CollectiongetAuthoritativeNameServer(org.xbill.DNS.Name zone) protected String[]getRegistrationDomains(IServiceTypeID aServiceTypeId) protected CollectiongetUpdateDomain(org.xbill.DNS.Name zone) Purges the underlying IServiceInfo cache if available in the current providervoidregisterService(IServiceInfo serviceInfo) Register the given service.protected voidsendToServer(IServiceInfo serviceInfo, boolean mode) voidUnregister all previously registered service.voidunregisterService(IServiceInfo serviceInfo) Unregister a previously registered service defined by serviceInfo.Methods inherited from class org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryContainerAdapter
disconnect, getBrowsingOrRegistrationDomains, getConnectedID, getRecords, getSearchPath, getServiceInfo, getServices, getServices, getServiceTypes, getSRVRecord, getSRVRecords, getSRVRecords, setResolver, setSearchPath, setTsigKeyMethods 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, removeServiceListener, removeServiceListener, removeServiceTypeListenerMethods inherited from class org.eclipse.ecf.core.AbstractContainer
addListener, fireContainerEvent, getAdapter, getPasswordFromConnectContext, removeListener
-
Constructor Details
-
DnsSdDiscoveryAdvertiser
public DnsSdDiscoveryAdvertiser()
-
-
Method Details
-
registerService
Description copied from interface:IDiscoveryAdvertiserRegister the given service. This publishes the service defined by the serviceInfo to the underlying publishing mechanism- Specified by:
registerServicein interfaceIDiscoveryAdvertiser- Overrides:
registerServicein classDnsSdDiscoveryContainerAdapter- Parameters:
serviceInfo- IServiceInfo of the service to be published. Must not benull.
-
unregisterService
Description copied from interface:IDiscoveryAdvertiserUnregister a previously registered service defined by serviceInfo.- Specified by:
unregisterServicein interfaceIDiscoveryAdvertiser- Overrides:
unregisterServicein classDnsSdDiscoveryContainerAdapter- Parameters:
serviceInfo- IServiceInfo defining the service to unregister. Must not benull.
-
unregisterAllServices
public void unregisterAllServices()Description copied from interface:IDiscoveryAdvertiserUnregister all previously registered service.- Specified by:
unregisterAllServicesin interfaceIDiscoveryAdvertiser- Overrides:
unregisterAllServicesin classAbstractDiscoveryContainerAdapter- See Also:
-
purgeCache
Description copied from interface:IDiscoveryLocatorPurges the underlying IServiceInfo cache if available in the current provider- Specified by:
purgeCachein interfaceIDiscoveryLocator- Overrides:
purgeCachein classAbstractDiscoveryContainerAdapter- Returns:
- The previous cache content
- See Also:
-
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.
-
sendToServer
-
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
-
getContainerName
- Specified by:
getContainerNamein classAbstractDiscoveryContainerAdapter- Returns:
- The name of this discovery container
-