| java.lang.Object org.libresource.so6.core.Workspace
Workspace | public class Workspace (Code) | | The Workspace class represents your local shared directory in
the so6 representation. Any workspace can be connected to one or several So6
Queue. Those connection are represented by the WsConnection
class and all the synchronisation operations will be made on those connections.
The Workspace class is just there to federate those connections
in order to build and represent the synchronisation network.
Workspace are identified by an unique ID and have several queue connections.
author: Smack version: 1.0, 26/05/04 See Also: org.libresource.so6.core.WsConnection See Also: org.libresource.so6.core.engine.util.UniqueId since: JDK1.4 |
Constructor Summary | |
public | Workspace(String wsBasePath) Load an existing Workspace object in order to access to
its id and WsConnections. |
SO6PREFIX | final public static String SO6PREFIX(Code) | | Name of the data directory where the Workspace store the meta data (Id,
Connections...)
|
SO6_WS_FILE | final public static String SO6_WS_FILE(Code) | | Name of the file where the workspace id will be stored
|
Workspace | public Workspace(String wsBasePath) throws IOException(Code) | | Load an existing Workspace object in order to access to
its id and WsConnections.
Parameters: wsBasePath - workspace base path a String . |
createConnection | public String createConnection(Properties externalProperties, String clientIClassName, String connectionName) throws IOException(Code) | | Create a new WsConnection linked to that workspace.
As WsConnection can be made to any kind of So6 Queue, we let the user set
his personal connections properties, then we set the default ones.
Parameters: externalProperties - external properties need to init the clientI class Parameters: clientIClassName - class to call when we use the connection Parameters: connectionName - name of that connection the file path of the WsConnection propertie file exception: Exception - If any error occured during the creation of the connectionfiles |
createWorkspace | public static Workspace createWorkspace(String basePath) throws IOException(Code) | | Create a new Workspace object and generate its unique
identifier
Parameters: basePath - workspace base path a String . |
deleteConnection | public static void deleteConnection(String wsConnectionPath) throws Exception(Code) | | Remove a WsConnection
Parameters: wsConnectionPath - absolute file path of a WsConnection property file(so6.properties) exception: Exception - If any error occured during the removed of the connectionfiles |
deleteConnection | public void deleteConnection(int connectionNumber) throws Exception(Code) | | Remove a WsConnection linked to that workspace.
Parameters: connectionNumber - the connection number of that workspace exception: Exception - If any error occured during the removed of the connectionfiles |
getConnectionByQueueId | public WsConnection getConnectionByQueueId(String queueId) throws Exception(Code) | | Get a WsConnection linked to that workspace.
If the parameter is
null then the connection number will be 1.
Parameters: connectionNumber - the connection number of that WsConnection a WsConnection exception: Exception - If any error occured during the removed of the connection files |
getId | public String getId() throws IOException(Code) | | Returns the unique id as a string using caratere [a-z,A-Z,0-9,_] (The
content of the file workspaceId)
the workspace id as a String |
listConnections | public WsConnection[] listConnections()(Code) | | List the WsConnection linked to that workspace.
an array of the linked WsConnection exception: Exception - If any error occured during the removed of the connectionfiles |
|
|