X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Forg%2Fvamsas%2Fclient%2FIClient.java;h=6c077db61ad00947383be8e9f4e8892ec78a0056;hb=bfa5fa76a9afb08a4b8581eec0c014f738d60dbe;hp=ae7f1754e1177d9b7310d327a9923d417c3e2994;hpb=bdf67676f72c1ec0730e07906ae52391d26bbd85;p=vamsas.git diff --git a/src/org/vamsas/client/IClient.java b/src/org/vamsas/client/IClient.java index ae7f175..6c077db 100644 --- a/src/org/vamsas/client/IClient.java +++ b/src/org/vamsas/client/IClient.java @@ -5,7 +5,6 @@ package org.vamsas.client; import java.beans.PropertyChangeListener; -import java.util.EventListener; /** * Defines the methods availabable to a vamsas @@ -65,7 +64,7 @@ public interface IClient { /** * register handler for updates for the current session */ - public void addDocumentUpdateHandler(EventListener evt); + public void addDocumentUpdateHandler(PropertyChangeListener evt); /** * get vamsas document with * user and app specific data @@ -75,6 +74,9 @@ public interface IClient { * Queue new Vorba objects for storage and propagation * to other clients (via Event.DOCUMENT_UPDATE based * notification of document change) + * New objects without provenance information will be + * given a default entry using the IClient's application, + * user (and session) handles */ public void updateDocument(IClientDocument newdoc); /** @@ -87,11 +89,29 @@ public interface IClient { public void storeDocument(java.io.File location); /** * Add a listener to a particular event chain. - * See org.vamsas.client.Events for allowed values for EventChain. - * The EventChain value is passed as the propertyName in the java.bean.PropertyChangeEvent - * TODO: build our own vamsas Event/Listener model. + * See org.vamsas.client.Events for allowed + * values for EventChain. + * The EventChain value is passed as the + * propertyName in the java.bean.PropertyChangeEvent + * TODO: extend class to form own vamsas Event/Listener model. * @param EventChain Name of event. Blank/null registers handler for all events. * @param evt - event handler function. */ public void addVorbaEventHandler(String EventChain, PropertyChangeListener evt); + /** + * client application calls this to force the + * Vorba client to check for updates immediately. + * + */ + public void pollUpdate(); + + /** + * Client application calls this after any pre-session initialization + * (registering of Handlers, etc) + * Exceptions are raised for any failures. Any stateful calls to the session prior to + * this will result in an implicit call to joinSession - if that results in an exception + * then the VamsasClient should raise an Error. + * TODO: create VAMSAS exception hierarchy (in a language agnostic manner) + */ + public void joinSession() throws Exception; }