From: jprocter Date: Tue, 24 Jan 2006 19:23:12 +0000 (+0000) Subject: introduced org.vamsas.client.IClientAppData interface to get and set app-global and... X-Git-Tag: Release_0.2~348 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d83ed2336315c914ea3716603fdff535a45d1f44;p=vamsas.git introduced org.vamsas.client.IClientAppData interface to get and set app-global and user-specific appdata chunks. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@172 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/src/org/vamsas/client/IClientAppdata.java b/src/org/vamsas/client/IClientAppdata.java new file mode 100644 index 0000000..965a783 --- /dev/null +++ b/src/org/vamsas/client/IClientAppdata.java @@ -0,0 +1,61 @@ +/** + * + */ +package org.vamsas.client; + +import java.io.DataInput; +import java.io.DataOutput; + +/** + * Object for accessing Client and User specific data + * in an IClientDocument instance. + * + */ +public interface IClientAppdata { + /** + * @return true if Client's non-user specific application data is non-zero length. + */ + boolean hasClientAppdata(); + /** + * @return true if User's Client Application data is non-zero length + */ + boolean hasUserAppdata(); + /** + * + * @return byte array containing the Client's non-user specific application data + */ + byte[] getClientAppdata(); + /** + * + * @return byte array containing the Client's user specific application data + */ + byte[] getUserAppdata(); + /** + * set the non-User-specific application data + * @param data - the new non-user-specific data + */ + void setClientAppdata(byte[] data); + /** + * set the User-specific application data + * @param data - the new user-specific data + */ + void setUserAppdata(byte[] data); + /** + * @return non-user specific data output stream + */ + DataOutput getClientOutputStream(); + /** + * @return non-user specific data input stream + */ + DataInput getClientInputStream(); + /** + * + * @return user specific data output stream + */ + DataOutput getUserOutputStream(); + /** + * + * @return user specific data input stream + */ + DataInput getUserInputStream(); +} diff --git a/src/org/vamsas/client/IClientDocument.java b/src/org/vamsas/client/IClientDocument.java index 9983713..84149b6 100644 --- a/src/org/vamsas/client/IClientDocument.java +++ b/src/org/vamsas/client/IClientDocument.java @@ -92,18 +92,9 @@ public interface IClientDocument { * @return array of VorbaIds for the registered objects */ VorbaId[] registerObjects(object[] unregistered); - - /** - * Gets the application data associated with this session's - * vamsas document that is accessible by the client - * application (and user) - * @return applicationData field - */ - byte[] getApplicationData(); /** - * Sets the application data entry associated with - * the application and user participating in this vamsas session. - * @param newData new contents of applicationData field. + * Get instance of Client and User specific vamsas document data access interface. + * @return Interface to Client and user specific application data */ - void setApplicationData(byte[] newData); + IClientAppdata getClientAppdata(); } \ No newline at end of file