Class AFTIPCSocketAddress

java.lang.Object
All Implemented Interfaces:
Serializable

public final class AFTIPCSocketAddress extends AFSocketAddress
An AFSocketAddress for TIPC sockets. The TIPC socket API provides three different address types:
  • Service Address.

    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).

  • Service Range.

    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).

  • Socket Address.

    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, AFTIPCSocketAddress.Scope.SCOPE_NODE if the user only wants node local visibility, and AFTIPCSocketAddress.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.

Author:
Christian Kohlschütter (documentation credits to Jon Maloy and the TIPC team).
See Also: