- All Known Subinterfaces:
NetbiosAddress
- All Known Implementing Classes:
NbtAddress,UniAddress
public interface Address
Interface for both netbios and internet addresses
- Author:
- mbechler
-
Method Summary
Modifier and TypeMethodDescriptionGuess called name to try for session establishment.Return the IP address as text such as "192.168.1.15".Gets the host name of this address.Guess next called name to try for session establishment.Converts this address to an InetAddress.<T extends Address>
TUnwrap the address to a specific type
-
Method Details
-
unwrap
Unwrap the address to a specific type- Type Parameters:
T- the type to unwrap to- Parameters:
type- the target type to unwrap to- Returns:
- instance for type, null if the type cannot be unwrapped
-
getHostName
String getHostName()Gets the host name of this address.- Returns:
- the resolved host name, or the host address if it could not be resolved
-
getHostAddress
String getHostAddress()Return the IP address as text such as "192.168.1.15".- Returns:
- the ip address
-
toInetAddress
Converts this address to an InetAddress.- Returns:
- this address as an InetAddress
- Throws:
UnknownHostException- if the host cannot be resolved
-
firstCalledName
String firstCalledName()Guess called name to try for session establishment. These methods are used by the smb package.- Returns:
- guessed name
-
nextCalledName
Guess next called name to try for session establishment. These methods are used by the smb package.- Parameters:
tc- the transport context to use for name resolution- Returns:
- guessed name
-