1 package org.vamsas.client;
4 * Enumerates the event types generated during the lifecycle of a Vamsas
10 * Generated when a client has finished updating the document. Passes
11 * applicationHandle of client so the updating client can recognise its own
14 public static final String DOCUMENT_UPDATE = "org.vamsas.client.events.documentUpdateEvent";
17 * Generated when a new vamsas document is created (perhaps from some existing
18 * Vamsas data) so an application may do its own data space initialization.
19 * Raised for a new application connecting to a vamsas document
20 * which contains no existing data for that application.
22 public static final String DOCUMENT_CREATE = "org.vamsas.client.events.documentCreateEvent";
25 * Generated when a new vamsas client is attached to a session (Handle is
26 * passed) Note: the newly created client does not receive the event.
28 public static final String CLIENT_CREATION = "org.vamsas.client.events.clientCreateEvent";
31 * Generated when a vamsas client leaves a session (Handle is passed to all
34 public static final String CLIENT_FINALIZATION = "org.vamsas.client.events.clientFinalizationEvent";
37 * Generated prior to session Shutdown, after the last participating vamsas
38 * client has finalized.
40 public static final String SESSION_SHUTDOWN = "org.vamsas.client.events.SessionShutdownEvent";
43 * Generated for all clients when any client calls IClient.storeDocument() to
44 * allow them to store any updates before an offline copy of the session is
45 * created. Any client that handles this should call the
46 * IClient.getDocument(), update and then IClient.updateDocument in the same
47 * handler thread (the lock on the document is held until the handler exits).
48 * EventName: <Vamsas-session URN>
49 * NewValue: org.vamsas.client.IClient for session.
51 public static final String DOCUMENT_FINALIZEAPPDATA = "org.vamsas.client.events.DocumentFinalizeAppData";
54 * Generated by Vorba stub for the sole remaining client, after the penultimate
55 * client makes a call to finalizeClient(). It is only raised if the session has been modified since the
56 * last call to storeDocument() by any application.
57 * LATER: copies of a document should be on a per-user basis for multi-user sessions.
58 * Sequence is as follows : 1. All other vamsas clients have
59 * called finalizeClient() 2. Final living client monitors closures, and
60 * realises that it is last. 3. Final client generates event to prompt
61 * associated application to inquire if the user wishes to save the document
62 * for future reference.
63 * * Any call to finalizeClient in a thread other than the registered
64 * EventListener will block until the RequestToClose handler has exited.
67 public static final String DOCUMENT_REQUESTTOCLOSE = "org.vamas.client.DocumentRequestToCloseEvent";
69 public static java.util.Vector EventList = initList();
71 private static java.util.Vector initList() {
72 java.util.Vector vec = new java.util.Vector();
73 vec.add((Object) DOCUMENT_UPDATE);
74 vec.add((Object) DOCUMENT_CREATE);
75 vec.add((Object) CLIENT_CREATION);
76 vec.add((Object) CLIENT_FINALIZATION);
77 vec.add((Object) SESSION_SHUTDOWN);
78 vec.add((Object) DOCUMENT_REQUESTTOCLOSE);
79 vec.add((Object) DOCUMENT_FINALIZEAPPDATA);