|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
com.tarantella.tta.webservices.client.views.EmulatorSessionsView
public class EmulatorSessionsView
The class maintains a local cache of application sessions. By processing
events, the cache can be kept current without making a lot of calls
to the Secure Global Desktop (SGD) server.
The class also implements many of the web service calls in ITarantellaEmulatorSession
, allowing
application developers to manage application sessions through a single
object.
Field Summary | |
---|---|
static java.lang.String |
ACTION_ENDALL
Name of the event action to end all application sessions. |
static java.lang.String |
ACTION_RESUMEALL
Name of the event action to resume all application sessions. |
static java.lang.String |
ACTION_SUSPENDALL
Name of the event action to suspend all application sessions. |
Method Summary | |
---|---|
java.lang.String |
endSession(java.lang.String emulatorSessionId)
Ends an application session. |
void |
generateView(java.lang.String searchSpec,
java.lang.String[] attributes,
boolean forceRefresh)
Generates and caches a view of application sessions. |
int |
getEmulatorSessionsCount()
Gets the number of application sessions in the view. |
java.util.Enumeration |
getEmulatorSessionsEnumeration()
Returns a enumeration over the application sessions view. |
boolean |
isInNewBrowserWindow(IResponse object)
Deprecated. Tests if the object is an application session that should be resumed in a new browser window. New browser mode is no longer supported. |
boolean |
isInPlace(IResponse object)
Deprecated. Tests if the object is an application session that should be resumed in-place. in-place is no longer supported. |
java.lang.String |
lookupSessions(java.lang.String[] emulatorSessionIds,
java.lang.String[] desiredAttributes)
Looks-up attributes for one or more application sessions. |
boolean |
processEvent(java.lang.String eventName,
java.lang.String eventAction,
java.lang.String eventData)
Processes events affecting this view. |
java.lang.String |
resumeSession(java.lang.String emulatorSessionId)
Resumes a suspended application session. |
java.lang.String |
resumeSessionInPlace(java.lang.String emulatorSessionId,
java.lang.String launcherId)
Deprecated. This behaves like resumeSession(String) . |
java.lang.String |
resumeSessionInPlaceEx(java.lang.String emulatorSessionId,
java.lang.String launcherId)
Deprecated. This behaves identically to resumeSession(String) . |
java.lang.String |
search(java.lang.String searchSpec,
java.lang.String[] desiredAttributes)
Searches for application sessions. |
void |
setAttributes(java.lang.String[] attrs)
|
java.lang.String |
startSession(java.lang.String applicationName,
Item[] launchOptions)
Starts an application session by launching an application. |
Item |
startSessionInPlace(java.lang.String applicationName,
java.lang.String launcherId,
Item[] launchOptions)
Deprecated. This behaves like startSession(String, Item[]) . |
java.lang.String |
startSessionInPlaceEx(java.lang.String applicationName,
java.lang.String launcherId,
Item[] launchOptions)
Deprecated. This behaves identically to startSession(String, Item[]) . |
java.lang.String |
suspendSession(java.lang.String emulatorSessionId)
Suspends an application session. |
Methods inherited from class java.util.Observable |
---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ACTION_ENDALL
public static final java.lang.String ACTION_RESUMEALL
public static final java.lang.String ACTION_SUSPENDALL
Method Detail |
---|
public boolean processEvent(java.lang.String eventName, java.lang.String eventAction, java.lang.String eventData) throws java.rmi.RemoteException
eventName
- Name of the event. Supported events are:
IConstants.SESSION_EVT |
eventAction
- Event action. Supported actions are:
ACTION_ENDALL |
End all application sessions for the user. |
ACTION_RESUMEALL |
Resume all application sessions for the user. |
ACTION_SUSPENDALL |
Suspend all application sessions for the user. |
IConstants.ACTION_SESSION_ADDED |
Add an application sessions to the cached view. |
IConstants.ACTION_SESSION_REMOVED |
Remove an application sessions to the cached view. |
IConstants.ACTION_VIEW_REFRESH |
Refresh the local cached view from the SGD server. |
eventData
- Event data, for example, the application session ID.
true if the event was processed and the view updated |
false if the event was not processed leaving the view corrupt |
java.rmi.RemoteException
- On receipt of a SOAP fault.public void generateView(java.lang.String searchSpec, java.lang.String[] attributes, boolean forceRefresh) throws java.rmi.RemoteException
searchSpec
- RFC 2254 search specification to select matching
application sessionsattributes
- The attributes desired in the responseforceRefresh
- Flag controlling how the request is serviced.
true | request must be sent to the server |
false | request may be serviced from the cached view |
java.rmi.RemoteException
- On receipt of a SOAP fault.public boolean isInPlace(IResponse object)
object
- Application session object
public boolean isInNewBrowserWindow(IResponse object)
object
- Application session object
public int getEmulatorSessionsCount()
public java.util.Enumeration getEmulatorSessionsEnumeration()
IResponse
objects.public java.lang.String endSession(java.lang.String emulatorSessionId) throws java.rmi.RemoteException
NOTE: this API cannot be guaranteed to stop the application cleanly and should be used with caution. Whenever possible, users should close their applications.
emulatorSessionId
- Identifies the application session.
ITarantellaEmulatorSession.endSession(String, String)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String lookupSessions(java.lang.String[] emulatorSessionIds, java.lang.String[] desiredAttributes) throws java.rmi.RemoteException
emulatorSessionIds
- Array of application session IDs.desiredAttributes
- Array of attributes wanted in the response.
IConstants.LOCAL_ATTRS
is a shortcut to get those attributes
that can be retrieved cheaply.
ITarantellaEmulatorSession.lookupSessions(String, String[], String[])
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String resumeSession(java.lang.String emulatorSessionId) throws java.rmi.RemoteException
emulatorSessionId
- Identifies the application session.
ITarantellaEmulatorSession.resumeSession(String, String)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String resumeSessionInPlaceEx(java.lang.String emulatorSessionId, java.lang.String launcherId) throws java.rmi.RemoteException
resumeSession(String)
.
emulatorSessionId
- Identifies the application session.launcherId
- Name of the in-place launcher.
ITarantellaEmulatorSession.resumeSession(String, String)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String resumeSessionInPlace(java.lang.String emulatorSessionId, java.lang.String launcherId) throws java.rmi.RemoteException
resumeSession(String)
.
emulatorSessionId
- Identifies the application session.launcherId
- Name of the in-place launcher.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String search(java.lang.String searchSpec, java.lang.String[] desiredAttributes) throws java.rmi.RemoteException
searchSpec
- RFC 2254 search specification to select matching
application sessions.desiredAttributes
- Array of attributes wanted in the response.
IConstants.LOCAL_ATTRS
is a shortcut to get those attributes
that can be retrieved cheaply.
ITarantellaEmulatorSession.search(String, String, String[])
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String startSession(java.lang.String applicationName, Item[] launchOptions) throws java.rmi.RemoteException
applicationName
- The name of the application to launch.launchOptions
- Array of optional overrides for the launch.
See ITarantellaEmulatorSession.startSession(String, String, Item[])
for details.
ITarantellaEmulatorSession.startSession(String, String, Item[])
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String startSessionInPlaceEx(java.lang.String applicationName, java.lang.String launcherId, Item[] launchOptions) throws java.rmi.RemoteException
startSession(String, Item[])
.
applicationName
- The name of the application to launch.launcherId
- ID of the in-place launcherlaunchOptions
- Array of optional overrides for the launch.
ITarantellaEmulatorSession.startSession(String, String, Item[])
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public Item startSessionInPlace(java.lang.String applicationName, java.lang.String launcherId, Item[] launchOptions) throws java.rmi.RemoteException
startSession(String, Item[])
.
applicationName
- The name of the application to launch.launcherId
- ID of the in-place launcherlaunchOptions
- Array of optional overrides for the launch.
applicationName
is an SGD
application type, an empty Item
is returned. If
applicationName
is an SGD document type,
the document URL is returned in the Item
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String suspendSession(java.lang.String emulatorSessionId) throws java.rmi.RemoteException
emulatorSessionId
- Identifies the application session.
ITarantellaEmulatorSession.suspendSession(String, String)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public void setAttributes(java.lang.String[] attrs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |