public class CreateSessionSubmitter
extends java.lang.Object
OMERO
session service
.
This entails request validation, changing data format, and producing a
a response from the session key returned by the session service.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CannotCreateSessionErrorMsg |
Constructor and Description |
---|
CreateSessionSubmitter(SessionService service)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
util.object.Either<Error,CreateSessionResponse> |
submit(CreateSessionRequest data)
Submits the given request to the underlying service.
|
public static final java.lang.String CannotCreateSessionErrorMsg
public CreateSessionSubmitter(SessionService service)
service
- the underlying OMERO session service.java.lang.NullPointerException
- if the argument is null
.public util.object.Either<Error,CreateSessionResponse> submit(CreateSessionRequest data)
validated
. If validation fails an Error
will be returned that
details the detected validation errors. Otherwise, the request is
submitted to the underlying service. If the service cannot process the
request successfully, again an Error
will be returned. Otherwise,
the data returned by the service is used to instantiate a CreateSessionResponse
.data
- the request to submit.