U - the return type of the wrapped actionpublic abstract class ServerCall<U> extends Object implements APIDelegate<ESServerCall>
SessionManager ensures there's a valid session before executing the call.ConnectionManager, always use getSessionId(), since it is injected by the
SessionManager.ProjectSpace
is set,
it is checked whether it has an user session attached to it.| Constructor and Description |
|---|
ServerCall()
Default constructor.
|
ServerCall(ProjectSpace localProject)
Default constructor with project space.
|
ServerCall(ProjectSpace localProject,
org.eclipse.core.runtime.IProgressMonitor monitor)
Default constructor with project space and progress monitor.
|
ServerCall(ServerInfo server)
Default constructor with serverinfo.
|
ServerCall(ServerInfo server,
org.eclipse.core.runtime.IProgressMonitor monitor)
Default constructor with server info and progress monitor.
|
ServerCall(Usersession usersession)
Default constructor with user session.
|
ServerCall(Usersession usersession,
org.eclipse.core.runtime.IProgressMonitor monitor)
Default constructor with user session and progress monitor.
|
| Modifier and Type | Method and Description |
|---|---|
ESServerCall |
createAPI()
Creates the API interface for this class.
|
U |
execute()
Executes the server call.
|
org.eclipse.core.runtime.IProgressMonitor |
getProgressMonitor()
Returns the progress monitor instance that may be used during
execution of this server call.
|
ProjectSpaceBase |
getProjectSpace()
Returns the project space that will be checked for a valid user session when
executing this server call.
|
ServerInfo |
getServer()
Returns the server info that is used by this server call, if set.
|
Usersession |
getUsersession()
Returns the user session that is used by this server call.
|
void |
run(SessionId sessionId)
Runs this call with the given session ID.
|
ServerCall<U> |
setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor monitor)
Sets the progress monitor instance that may be used during
execution of this server call.
|
ServerCall<U> |
setServer(ServerInfo server)
Sets the server info that is used by this server call.
|
void |
setSessionId(SessionId sessionId)
Sets the session ID to be used by this server call.
|
ServerCall<U> |
setUsersession(Usersession usersession)
Sets the user session to be used by this server call.
|
ESServerCall |
toAPI()
Returns the API interface of this class.
|
public ServerCall()
public ServerCall(Usersession usersession)
usersession - preselected user sessionpublic ServerCall(ProjectSpace localProject)
localProject - relevant project space if existentpublic ServerCall(ServerInfo server)
server - a given serverpublic ServerCall(Usersession usersession, org.eclipse.core.runtime.IProgressMonitor monitor)
usersession - preselected user sessionmonitor - monitor a progress monitor instance that is used during execution of the server callpublic ServerCall(ProjectSpace localProject, org.eclipse.core.runtime.IProgressMonitor monitor)
localProject - relevant project, if existentmonitor - monitor a progress monitor instance that is used during execution of the server callpublic ServerCall(ServerInfo server, org.eclipse.core.runtime.IProgressMonitor monitor)
server - a given server infomonitor - monitor a progress monitor instance that is used during execution of the server callpublic ServerInfo getServer()
public ServerCall<U> setServer(ServerInfo server)
server - the server info that should be used by this server callpublic ServerCall<U> setUsersession(Usersession usersession)
usersession - the user session to be used by the server callpublic Usersession getUsersession()
public ProjectSpaceBase getProjectSpace()
public ServerCall<U> setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor monitor)
monitor - a progress monitor instance that may used during execution
of this server callpublic org.eclipse.core.runtime.IProgressMonitor getProgressMonitor()
public void setSessionId(SessionId sessionId)
sessionId - the session ID to be used for authentication against the serverpublic void run(SessionId sessionId) throws ESException
sessionId - the session ID to be used for authentication against the serverESException - in case any exception occurs during execution of the callpublic U execute() throws ESException
UESException - in case any exception occurs during execution of the callpublic ESServerCall toAPI()
toAPI in interface APIDelegate<ESServerCall>APIDelegate.toAPI()public ESServerCall createAPI()
createAPI in interface APIDelegate<ESServerCall>APIDelegate.createAPI()Copyright © 2017. All rights reserved.