13.07.2015 Views

SAMP — Simple Application Messag- ing Protocol Version 1.11 - IVOA

SAMP — Simple Application Messag- ing Protocol Version 1.11 - IVOA

SAMP — Simple Application Messag- ing Protocol Version 1.11 - IVOA

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5. Another new method, p<strong>ing</strong>() is added to the hub API. This may becalled by registered or unregistered applications (as a special case theprivate-key argument may be omitted), and can be used to determinewhether the hub is respond<strong>ing</strong> to requests. Any non-error returnindicates that the hub is runn<strong>ing</strong>.The private-key str<strong>ing</strong> referred to above serves two purposes. Firstit identifies the client in hub/client communications. Some such identifieris required, since XML-RPC calls have no other way of determin<strong>ing</strong> thesender’s identity. Second, it prevents application spoof<strong>ing</strong>, since the privatekey is never revealed to other applications, so that one application cannotpose as another in mak<strong>ing</strong> calls to the hub.The usual XML-RPC fault mechanism is used to respond to invalid callsas described in Section 3.13. The XML-RPC ’s element SHOULD contain a user-directed message as appropriate and the value has no particular significance.4.3 Lockfile and Hub DiscoveryHub discovery is performed by examin<strong>ing</strong> a lockfile in a well-known location.This has the consequence that in normal operation each user may runonly one hub, and users do not share hubs. The name of the lockfile is“.samp” in the user’s home directory. A “home directory” is a somewhatsystem-dependent concept: we define it as the value of the $HOME environmentvariable on Unix-like systems and as the value of the %USERPROFILE%environment variable on Microsoft Windows 2 .The format of the file is given by the follow<strong>ing</strong> BNF productions: ::= ::= | ::= | ::= | ::= "#" ::= "=" ::= ::= | ::= | ::= "\r" | "\n" | "\r" "\n"2 Note to Java developers: contrary to what you might expect, the user.homesystem property on Windows does not give you the value of USERPROFILE. Seehttp://bugs.sun.com/bugdatabase/view bug.do?bug id=4787931.26

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!