Personal tools
  • We're Hiring!

You are here: Home Documentation Previous versions OME Server Developer Remote Framework Reference Administrative

Administrative

Connecting to and disconnecting from the data server; querying the remote framework version

Administrative methods

The administrative methods are used to manage the client's connections to an OME data server.

 serverVersion

Retrieve the version of this server's remote framework.

Returns the version of the remote framework running on the data server. This version can be checked before logging into the server, and allows a client application to only allow a user to connect to a server running the appropriate version of the remote framework.

No parameters

Return value:

version [Array] The server version. Represented as a three-element array of integers. The elements are, in order, the major, minor, and patch versions of the server. So, for instance, a server running version 2.3.1 of the remote framework would return [2,3,1] from this method.

Administrative; since 2.2.1


 createSession

Create a new connection to the data server.

Logs the specified OME user into the data server. The session key returned by this method can then be used to call the dispatched methods, which provide the actual access to the metadata in the data server. Once the connection is no longer needed, the client should call the closeSession method.

Required parameters:

username [String] The username of the OME user which wishes to connect

password [String] The user's password

Return value:

sessionKey [String] A string session key which can be used to refer to this connection

Exceptions:

INVALID LOGIN The server could not log in the specified user, either because of an invalid username/password pair, or some other server-side problem.

Administrative; since 2.2.1


 authenticateSession

Authenticates an existing connection to the data server.

Allows an existing connection, specified by its session key, to be reauthenticated. If the session has already been closed by the closeSession method, or if the data server has determined that the connection is stale (unused for too long), this method will return a false value. If the session key still represents a valid connection, the method will return true.

Required parameters:

sessionKey [String] The string session key to authenticate

Return value:

valid [Integer] 1 if the session key represents a valid connection, 0 otherwise.

Administrative; since 2.2.1


 closeSession

Closes an existing connection to the data server.

Closes a connection to the data server. This method should be called when a user's connection to the data server is no longer needed, whether due to an explicit logout or because of a fatal error condition. The data server will most likely be able to free the resources of a stale remote connection, but your code really should be more thoughtful than that, don't you think?

Required parameters:

sessionKey [String] The string session key to close

Return value:

valid [Integer] 1 if the connection was successfully closed, 0 otherwise. Regardless of the result, the specified session key will no longer represent a valid connection.

Administrative; since 2.2.1

Document Actions