public abstract class DnsSdDiscoveryContainerAdapter extends AbstractDiscoveryContainerAdapter
| Modifier and Type | Class and Description |
|---|---|
protected class |
DnsSdDiscoveryContainerAdapter.SRVRecordComparator |
| Modifier and Type | Field and Description |
|---|---|
protected org.xbill.DNS.Resolver |
resolver |
protected DnsSdServiceTypeID |
targetID |
allServiceListeners, serviceListeners, servicesNamespaceName, serviceTypeListenersCONTAINER_NAMECONTAINER_NAME| Constructor and Description |
|---|
DnsSdDiscoveryContainerAdapter(String aNamespaceName,
DiscoveryContainerConfig aConfig) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
connect(ID targetID,
IConnectContext connectContext)
Connect to a target remote process or process group.
|
void |
disconnect()
Disconnect.
|
protected Collection |
getBrowsingOrRegistrationDomains(IServiceTypeID aServiceTypeId,
String[] rrs) |
ID |
getConnectedID()
Get the target ID that this container instance has connected to.
|
protected org.xbill.DNS.Record[] |
getRecords(DnsSdServiceTypeID serviceTypeId) |
String[] |
getSearchPath() |
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()
Synchronously get service info about all known services of given service
type
|
protected SortedSet |
getSRVRecord(org.xbill.DNS.Lookup query,
Comparator aComparator) |
protected SortedSet |
getSRVRecords(org.xbill.DNS.Lookup[] queries) |
protected SortedSet |
getSRVRecords(org.xbill.DNS.Lookup[] queries,
Comparator aComparator) |
void |
registerService(IServiceInfo serviceInfo)
Register the given service.
|
void |
setResolver(String aResolver) |
void |
setSearchPath(String[] searchPaths) |
void |
setTsigKey(String tsigKeyName,
String tsigKey) |
void |
unregisterService(IServiceInfo serviceInfo)
Unregister a previously registered service defined by serviceInfo.
|
addServiceListener, addServiceListener, addServiceTypeListener, clearListeners, dispose, fireServiceDiscovered, fireServiceTypeDiscovered, fireServiceUndiscovered, getAsyncServiceInfo, getAsyncServices, getAsyncServices, getAsyncServiceTypes, getConfig, getConnectNamespace, getContainerName, getID, getListeners, getServiceEvent, getServicesNamespace, purgeCache, removeServiceListener, removeServiceListener, removeServiceTypeListener, unregisterAllServicesaddListener, fireContainerEvent, getAdapter, getPasswordFromConnectContext, removeListenerprotected org.xbill.DNS.Resolver resolver
protected DnsSdServiceTypeID targetID
public DnsSdDiscoveryContainerAdapter(String aNamespaceName, DiscoveryContainerConfig aConfig)
public IServiceInfo getServiceInfo(IServiceID aServiceId)
IDiscoveryLocatoraServiceId - IServiceID of the service to get info about. Must not be
null.null if no
information retrievable.public IServiceTypeID[] getServiceTypes()
IDiscoveryLocatornull. May be of length 0.public IServiceInfo[] getServices()
IDiscoveryLocatornull. May be of length 0.public IServiceInfo[] getServices(IServiceTypeID aServiceTypeId)
IDiscoveryLocatoraServiceTypeId - IServiceTypeID defining the type of service we are interested
in getting service info about. Must not be nullnull. May be of length 0.public void registerService(IServiceInfo serviceInfo)
IDiscoveryAdvertiserserviceInfo - IServiceInfo of the service to be published. Must not be
null.public void unregisterService(IServiceInfo serviceInfo)
IDiscoveryAdvertiserserviceInfo - IServiceInfo defining the service to unregister. Must not be
null.public abstract void connect(ID targetID, IConnectContext connectContext) throws ContainerConnectException
IContainertargetID - 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.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.public ID getConnectedID()
IContainernull
if container not connected.public void disconnect()
IContainernull.protected Collection getBrowsingOrRegistrationDomains(IServiceTypeID aServiceTypeId, String[] rrs)
protected org.xbill.DNS.Record[] getRecords(DnsSdServiceTypeID serviceTypeId)
protected SortedSet getSRVRecords(org.xbill.DNS.Lookup[] queries)
protected SortedSet getSRVRecords(org.xbill.DNS.Lookup[] queries, Comparator aComparator)
protected SortedSet getSRVRecord(org.xbill.DNS.Lookup query, Comparator aComparator)
public void setSearchPath(String[] searchPaths)
searchPaths - The default search path used for discoverypublic String[] getSearchPath()
public void setResolver(String aResolver)
aResolver - The resolver to useDnsSdDiscoveryException - if hostname cannot be resolvedCopyright © 2004–2020 Eclipse Foundation. All rights reserved.