java.lang.Object
org.newsclub.net.unix.tipc.AFTIPCDestName
- All Implemented Interfaces:
Serializable
The TIPC-specific DestName response that may be included as ancillary data.
- Author:
- Christian Kohlschütter
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getLower()
Returns the "lower" value of the service range (or the service "instance" if identical to the upper value).int
getType()
Returns the "type" value.int
getUpper()
Returns the "upper" value of the service range (or the service "instance" if identical to the lower value).boolean
Checks if this DestName describes a service range (as opposed to a service) address.org.newsclub.net.unix.AFTIPCSocketAddress
toSocketAddress
(org.newsclub.net.unix.AFTIPCSocketAddress.Scope scope, boolean alwaysRange) Converts this DestName to a properAFTIPCSocketAddress
, by using the givenAFTIPCSocketAddress.Scope
(which is otherwise not included).
-
Constructor Details
-
AFTIPCDestName
public AFTIPCDestName(int type, int lower, int upper) Creates a new instance.- Parameters:
type
- The "type" value.lower
- The "lower" service range value (or the service "instance" iflower
andupper
are the same).upper
- The "upper" service range value (or the service "instance" iflower
andupper
are the same).
-
-
Method Details
-
getType
public int getType()Returns the "type" value.- Returns:
- The type.
-
getLower
public int getLower()Returns the "lower" value of the service range (or the service "instance" if identical to the upper value).- Returns:
- The lower value.
-
getUpper
public int getUpper()Returns the "upper" value of the service range (or the service "instance" if identical to the lower value).- Returns:
- The upper value.
-
isServiceRange
public boolean isServiceRange()Checks if this DestName describes a service range (as opposed to a service) address.- Returns:
true
if thegetLower()
value is different from thegetUpper()
value.
-
toSocketAddress
public org.newsclub.net.unix.AFTIPCSocketAddress toSocketAddress(org.newsclub.net.unix.AFTIPCSocketAddress.Scope scope, boolean alwaysRange) Converts this DestName to a properAFTIPCSocketAddress
, by using the givenAFTIPCSocketAddress.Scope
(which is otherwise not included).- Parameters:
scope
- The scope to use.alwaysRange
- Iftrue
, a service range address is even returned when a service address would suffice.- Returns:
- The address.
-