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
Methods inherited from class org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryContainerAdapter |
disconnect, getBrowsingOrRegistrationDomains, getConnectedID, getRecords, getSearchPath, getServiceInfo, getServices, getServices, getServiceTypes, getSRVRecord, getSRVRecords, getSRVRecords, setResolver, setSearchPath, setTsigKey |
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, removeServiceListener, removeServiceListener, removeServiceTypeListener |
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 |
DnsSdDiscoveryAdvertiser
public DnsSdDiscoveryAdvertiser()
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:
IDiscoveryAdvertiser.unregisterAllServices()
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:
IDiscoveryLocator.purgeCache()
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 java.util.Collection getUpdateDomain(org.xbill.DNS.Name zone)
throws org.xbill.DNS.TextParseException
- Throws:
org.xbill.DNS.TextParseException
getAuthoritativeNameServer
protected java.util.Collection getAuthoritativeNameServer(org.xbill.DNS.Name zone)
throws org.xbill.DNS.TextParseException
- Throws:
org.xbill.DNS.TextParseException
getRegistrationDomains
protected java.lang.String[] getRegistrationDomains(IServiceTypeID aServiceTypeId)
getContainerName
public java.lang.String getContainerName()
- Specified by:
getContainerName
in class AbstractDiscoveryContainerAdapter
- Returns:
- The name of this discovery container