public class NameServiceClientImpl extends Object implements Runnable, NameServiceClient
| Constructor and Description |
|---|
NameServiceClientImpl(CIFSContext tc) |
| Modifier and Type | Method and Description |
|---|---|
UniAddress[] |
getAllByName(String hostname,
boolean possibleNTDomainOrWorkgroup)
Lookup addresses for the given hostname.
|
UniAddress |
getByName(String hostname)
Determines the address of a host given it's host name.
|
UniAddress |
getByName(String hostname,
boolean possibleNTDomainOrWorkgroup)
Lookup hostname and return it's UniAddress.
|
Lmhosts |
getLmhosts() |
NbtAddress |
getLocalHost() |
Name |
getLocalName() |
NbtAddress[] |
getNbtAllByAddress(NetbiosAddress addr)
Retrieve all addresses of a host by it's address.
|
NbtAddress[] |
getNbtAllByAddress(String host)
Retrieve all addresses of a host by it's address.
|
NbtAddress[] |
getNbtAllByAddress(String host,
int type,
String scope)
Retrieve all addresses of a host by it's address.
|
NbtAddress[] |
getNbtAllByName(String host,
int type,
String scope,
InetAddress svr)
Retrieve all addresses of a host by it's name.
|
NbtAddress |
getNbtByName(String host)
Determines the address of a host given it's host name.
|
NbtAddress |
getNbtByName(String host,
int type,
String scope)
Determines the address of a host given it's host name.
|
NbtAddress |
getNbtByName(String host,
int type,
String scope,
InetAddress svr)
Determines the address of a host given it's host name.
|
NbtAddress[] |
getNodeStatus(NetbiosAddress addr) |
Name |
getUnknownName() |
void |
run() |
public NameServiceClientImpl(CIFSContext tc)
tc - public NbtAddress[] getNodeStatus(NetbiosAddress addr) throws UnknownHostException
getNodeStatus in interface NameServiceClientUnknownHostExceptionpublic NbtAddress getNbtByName(String host) throws UnknownHostException
NameServiceClientUniAddress or InetAddress
getByName methods can be used for that.getNbtByName in interface NameServiceClienthost - hostname to resolveUnknownHostException - if there is an error resolving the namepublic NbtAddress getNbtByName(String host, int type, String scope) throws UnknownHostException
NameServiceClienttype. Types(aka Hex Codes)
are used to distinguish the various services on a host. Here is
a fairly complete list of NetBIOS hex codes. Scope is not used but is
still functional in other NetBIOS products and so for completeness it has been
implemented. A scope of null or ""
signifies no scope.getNbtByName in interface NameServiceClienthost - the name to resolvetype - the hex code of the namescope - the scope of the nameUnknownHostException - if there is an error resolving the namepublic NbtAddress getNbtByName(String host, int type, String scope, InetAddress svr) throws UnknownHostException
NameServiceClienttype. Types(aka Hex Codes)
are used to distinguish the various services on a host. Here is
a fairly complete list of NetBIOS hex codes. Scope is not used but is
still functional in other NetBIOS products and so for completeness it has been
implemented. A scope of null or ""
signifies no scope.
The additional svr parameter specifies the address to
query. This might be the address of a specific host, a name server,
or a broadcast address.getNbtByName in interface NameServiceClienthost - the name to resolvetype - the hex code of the namescope - the scope of the namesvr - server to queryUnknownHostException - if there is an error resolving the namepublic NbtAddress[] getNbtAllByName(String host, int type, String scope, InetAddress svr) throws UnknownHostException
NameServiceClientgetNbtAllByName in interface NameServiceClienthost - hostname to lookup all addresses fortype - the hexcode of the namescope - the scope of the namesvr - server to queryUnknownHostExceptionpublic NbtAddress[] getNbtAllByAddress(String host) throws UnknownHostException
NameServiceClientgetNbtAllByAddress in interface NameServiceClienthost - hostname to lookup all addresses forUnknownHostException - if there is an error resolving the namepublic NbtAddress[] getNbtAllByAddress(String host, int type, String scope) throws UnknownHostException
NameServiceClientNameServiceClient.getByName(java.lang.String, boolean)
for a description of type
and scope.getNbtAllByAddress in interface NameServiceClienthost - hostname to lookup all addresses fortype - the hexcode of the namescope - the scope of the nameUnknownHostException - if there is an error resolving the namepublic NbtAddress[] getNbtAllByAddress(NetbiosAddress addr) throws UnknownHostException
NameServiceClientgetNbtAllByAddress in interface NameServiceClientaddr - the address to queryUnknownHostException - if address cannot be resolvedpublic UniAddress getByName(String hostname) throws UnknownHostException
NameServiceClientgetByName in interface NameServiceClienthostname - NetBIOS or DNS hostname to resolveUnknownHostException - if there is an error resolving the namepublic UniAddress getByName(String hostname, boolean possibleNTDomainOrWorkgroup) throws UnknownHostException
NameServiceClientgetByName in interface NameServiceClientUnknownHostExceptionpublic UniAddress[] getAllByName(String hostname, boolean possibleNTDomainOrWorkgroup) throws UnknownHostException
NameServiceClientgetAllByName in interface NameServiceClientUnknownHostExceptionpublic NbtAddress getLocalHost()
getLocalHost in interface NameServiceClientNameServiceClient.getLocalHost()public Name getLocalName()
getLocalName in interface NameServiceClientNameServiceClient.getLocalName()public Lmhosts getLmhosts()
public Name getUnknownName()
getUnknownName in interface NameServiceClientNameServiceClient.getUnknownName()Copyright © 2023. All rights reserved.