|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.emfstore.internal.client.model.connectionmanager.ServerCall<U>
U
- the return type of the wrapped actionpublic abstract class ServerCall<U>
This class is intended to wrap all server calls. It may be used either by sub-classing or using anonymous classes.
The SessionManager
ensures there's a valid session before executing the call.
For call of the ConnectionManager
, always use getSessionId()
, since it is injected by the
SessionManager
.
If initialized with an user session, it will be used for the server class when the SessionProvider isn't extended by
the user to change this behavior.
Using serverInfo as an input will call the login dialog in the default implementation.
Further, in the default implementation, when the ProjectSpace
is set,
it is checked whether it has an user session attached to it.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 callMethod Detail |
---|
public ServerInfo getServer()
public ServerCall<U> setServer(ServerInfo server)
server
- the server info that should be used by this server call
public ServerCall<U> setUsersession(Usersession usersession)
usersession
- the user session to be used by the server call
public 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 call
public 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 server
ESException
- in case any exception occurs during execution of the callpublic U execute() throws ESException
U
ESException
- 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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |