ISSUE: getHubID/getSelfID

Thomas Boch boch at newb6.u-strasbg.fr
Wed Apr 30 05:13:06 PDT 2008


Hi,

> However there are two special client-ids which the registered client might
> want to know:
> 
>     - its own client ID
>     - the ID of the hub (in its capacity as a registered application,
>       which is how it would send housekeeping messages like
>       "the hub is about to shut down")

As they are indeed 2 *special* client-ids, I think it makes sense to
have methods allowing to easily retrieve them.

> There has been the suggestion to remove it
> and dictate that the hub public ID must have a fixed well-knowne value
> such as "0".

I don't like the idea of dictating an ID for the hub. It is much cleaner
to have a getHubID method, and this should not put any unbearable
additional burden on hub developers.

> Currently there is no easy way for a client to find its own ID.
> Should there be a getSelfID() method?  Or should this value be
> returned by the register method (note the Standard Profile register()
> method currently returns a private key specific to the application,
> but this is not in general the same as the public id).

I think we can have both. The register method could return a map with
keys 'private-key' and 'public-id' along with the corresponding values.

Cheers,
Thomas



More information about the apps-samp mailing list