Class AFTIPCDestName

java.lang.Object
org.newsclub.net.unix.tipc.AFTIPCDestName
All Implemented Interfaces:
Serializable

public final class AFTIPCDestName extends Object implements Serializable
The TIPC-specific DestName response that may be included as ancillary data.
Author:
Christian Kohlschütter
See Also:
  • 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" if lower and upper are the same).
      upper - The "upper" service range value (or the service "instance" if lower and upper 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 the getLower() value is different from the getUpper() value.
    • toSocketAddress

      public AFTIPCSocketAddress toSocketAddress(AFTIPCSocketAddress.Scope scope, boolean alwaysRange)
      Converts this DestName to a proper AFTIPCSocketAddress, by using the given AFTIPCSocketAddress.Scope (which is otherwise not included).
      Parameters:
      scope - The scope to use.
      alwaysRange - If true, a service range address is even returned when a service address would suffice.
      Returns:
      The address.