AFSocketAddress for TIPC sockets.
The TIPC socket API provides three different address types:
This address type consists of a 32-bit service type identifier and a 32-bit service instance identifier.
The type identifier is typically determined and hard-coded by the user application programmer, but its value may have to be coordinated with other applications which might be present in the same cluster. The instance identifier is often calculated by the program, based on application specific criteria.
Typical invocation: ofService(int, int).
This address type represents a range of service addresses of the same type and with instances between a lower and an upper range limit.
By binding a socket to this address type one can make it represent many instances, something which has proved useful in many cases. This address type is also used as multicast address.
Typical invocation: ofServiceRange(int, int, int).
This address is a reference to a specific socket in the cluster.
It contains a 32-bit port number and a 32-bit node hash number. The port number is generated by the system when the socket is created, and the node hash is generated from the corresponding node identity.
An address of this type can be used for connecting or for sending messages in the same way as service addresses can be used, but is only valid as long as the referenced socket exists.
Typical invocation: ofSocket(int, int).
When binding a socket to a service address or address range, the visibility scope of the binding
must be indicated. There are two options, Scope#SCOPE_NODE if the user only wants node
local visibility, and Scope#SCOPE_CLUSTER if he wants cluster global visibility. There
are almost no limitations to how sockets can be bound to service addresses: one socket can be
bound to many addresses or ranges, and many sockets can be bound to the same address or range.
The service types 0 through 63 are however reserved for system internal use, and are not available for user space applications.
When sending a message by service address the sender may indicate a lookup domain, also called lookup scope. This is a node hash number, limiting the set of eligible destination sockets to the indicated node. If this value is zero, all matching sockets in the whole cluster, as visible from the source node, are eligible.
| Modifier and Type | Class and Description |
|---|---|
| public static class | AFTIPCSocketAddress.
The TIPC address type. |
| public static class | AFTIPCSocketAddress.
The TIPC visibility scope. |
| Modifier and Type | Field and Description |
|---|---|
| private static AFAddressFamily | |
| private static final Pattern | |
| private static final long | |
| public static final int | TIPC_RESERVED_TYPES
The lowest user-publishable name type. |
| public static final int | TIPC_TOP_SRV
The "topology" service name type. |
| Access | Constructor and Description |
|---|---|
| private | AFTIPCSocketAddress(int port, final byte[] socketAddress, ObjectPool.
|
| Modifier and Type | Method and Description |
|---|---|
| public static synchronized AFAddressFamily | |
| public File | getFile()
Implements abstract org. Returns the |
| public AFTIPCSocketAddress. | |
| public int | |
| public int | |
| public int | Returns: The lower instance identifier.Returns the TIPC lower instance of this address. |
| public int | |
| public int | |
| public int | |
| public int | Returns: The lower instance identifier.Returns the TIPC upper instance of this address. |
| public boolean | hasFilename()
Implements abstract org. Checks if the address can be resolved to a |
| public static boolean | Returns: true if so.The instance to check. addr)Checks if an |
| public static boolean | Returns: true if so.The instance to check. addr)Checks if a |
| private static AFTIPCSocketAddress | newAFSocketAddress(int port, final byte[] socketAddress, ObjectPool.
|
| public static AFTIPCSocketAddress | Returns: The address.The URI. uri)Hides org. Returns an |
| public static AFTIPCSocketAddress | Returns: The address.The URI. uri, int The port to forcibly use, or overridePort)-1 for "don't override".Hides org. Returns an |
| public static AFTIPCSocketAddress | Returns: A correspondingAFTIPCSocketAddress instance.The address scope. scope,The service type (0-63 are reserved). type, int The service instance ID. instance)Returns an |
| public static AFTIPCSocketAddress | Returns: A correspondingAFTIPCSocketAddress instance.The service type (0-63 are reserved). type, int The service instance ID. instance)Returns an |
| public static AFTIPCSocketAddress | Returns: A correspondingAFTIPCSocketAddress instance.The address scope. scope,The service type (0-63 are reserved). type, int The service instance ID. instance, int The lookup domain. 0 indicates cluster global lookup, otherwise a node hash,
indicating that lookup should be performed only on that node domain)Returns an |
| public static AFTIPCSocketAddress | Returns: A correspondingAFTIPCSocketAddress instance.The emulated "port" number (not part of TIPC). javaPort, AFTIPCSocketAddress.The address scope. scope,The service type (0-63 are reserved). type, int The service instance ID. instance, int The lookup domain. 0 indicates cluster global lookup, otherwise a node hash,
indicating that lookup should be performed only on that node domain)Returns an |
| public static AFTIPCSocketAddress | Returns: A correspondingAFTIPCSocketAddress instance.The address scope. scope,The service type (0-63 are reserved). type, int Lower end of service instance ID range. lower, int Upper end of service instance ID range. upper)Returns an |
| public static AFTIPCSocketAddress | Returns: A correspondingAFTIPCSocketAddress instance.The service type (0-63 are reserved). type, int Lower end of service instance ID range. lower, int Upper end of service instance ID range. upper)Returns an |
| public static AFTIPCSocketAddress | Returns: A correspondingAFTIPCSocketAddress instance.The emulated "port" number (not part of TIPC). javaPort, AFTIPCSocketAddress.The address scope. scope,The service type (0-63 are reserved). type, int Lower end of service instance ID range. lower, int Upper end of service instance ID range. upper)Returns an |
| public static AFTIPCSocketAddress | Returns: A correspondingAFTIPCSocketAddress instance.32-bit port reference ID (not to be confused with the
ref, int InetSocketAddress#getPort() port).Node hash number (can be used as lookup domain with
node)ofService(Scope, int, int, int)).Returns an |
| public static AFTIPCSocketAddress | Returns: A correspondingAFTIPCSocketAddress instance.The emulated "port" number (not part of TIPC). javaPort, int 32-bit port reference ID (not to be confused with the
ref, int InetSocketAddress#getPort() port).Node hash number (can be used as lookup domain with
node)ofService(Scope, int, int, int)).Returns an |
| public static AFTIPCSocketAddress | Returns: A correspondingAFTIPCSocketAddress instance.Returns an |
| private static int | |
| private static byte[] | toBytes(AFTIPCSocketAddress.
|
| public String | toString()
Overrides java. Constructs a string representation of this InetSocketAddress. |
| private String | |
| public URI | toURI(String
The target scheme. scheme, URI An optional template to reuse certain parameters (e.g., the "path" component
for an template)http request), or null.Overrides org. Tries to create a URI based on this |
| public static AFTIPCSocketAddress | Returns: TheAFTIPCSocketAddress instance.The "special" address, int InetAddress.The port (use 0 for "none"). port)Returns an |
| public static AFTIPCSocketAddress | Returns: TheAFTIPCSocketAddress instance.The "special" hostname, as provided by hostname, int InetAddress#getHostName().The port (use 0 for "none"). port)Returns an |
| public static AFTIPCSocketAddress | Returns: TheAFTIPCSocketAddress instance.The address to unwrap. address)Returns an |