@Override
    public boolean equals(Object obj) {
        if (obj == null || !(obj instanceof RPCServiceAddress)) {
            return false;
        }
        RPCServiceAddress rhs = (RPCServiceAddress)obj;
        if (!serviceName.equals(rhs.serviceName)) {
            return false;
        }
        if (!connectionSpec.host().equals(rhs.connectionSpec.host())) {
            return false;
        }
        if (connectionSpec.port() != rhs.connectionSpec.port()) {
            return false;
        }
        if (!sessionName.equals(rhs.sessionName)) {
            return false;
        }
        return true;
    }
Constructs a service address from the given specifications. The last component of the service is stored as the
session name.

@param serviceName    The full service name of the address.
@param connectionSpec The connection specification.
messagebus/src/main/java/com/yahoo/messagebus/network/rpc/RPCServiceAddress.java