public interface SessionService
| Modifier and Type | Method and Description |
|---|---|
boolean |
close(java.net.URI omeroHostAndPort,
java.lang.String sessionKey)
Closes the specified session.
|
java.util.Optional<java.lang.String> |
create(java.net.URI omeroHostAndPort,
java.lang.String username,
java.lang.String password)
Starts a new session for the specified user.
|
java.util.Optional<java.lang.String> |
createAndKeepAlive(java.net.URI omeroHostAndPort,
java.lang.String username,
java.lang.String password,
java.time.Duration howLong)
Starts a new session for the specified user and keeps it alive for a
given amount of time.
|
boolean |
keepAlive(java.net.URI omeroHostAndPort,
java.lang.String sessionKey)
Issues a keep-alive command for the specified session.
|
java.util.Optional<java.lang.String> create(java.net.URI omeroHostAndPort,
java.lang.String username,
java.lang.String password)
omeroHostAndPort - detail the server to connect to.username - the login name of the user this session is for.password - the password of the user this session is for.java.lang.NullPointerException - if the URI argument is null.java.lang.IllegalArgumentException - if the username or password is
null or empty.boolean keepAlive(java.net.URI omeroHostAndPort,
java.lang.String sessionKey)
omeroHostAndPort - detail the server to connect to.sessionKey - the session ID.true if the command succeeded, false otherwise.java.lang.NullPointerException - if any argument is null.boolean close(java.net.URI omeroHostAndPort,
java.lang.String sessionKey)
omeroHostAndPort - detail the server to connect to.sessionKey - the session ID.true if the command succeeded, false otherwise.java.lang.NullPointerException - if any argument is null.java.util.Optional<java.lang.String> createAndKeepAlive(java.net.URI omeroHostAndPort,
java.lang.String username,
java.lang.String password,
java.time.Duration howLong)
omeroHostAndPort - detail the server to connect to.username - the login name of the user this session is for.password - the password of the user this session is for.howLong - how long from now to keep the session alive.java.lang.NullPointerException - if the URI or time argument is null.java.lang.IllegalArgumentException - if the username or password is
null or empty.