1
2
3
4
5
6 package net.kwfgrid.gworkflowdl.protocol.client;
7
8 import net.kwfgrid.gworkflowdl.protocol.IMethodCallStrategy;
9 import net.kwfgrid.gworkflowdl.protocol.IncompatibleVersionsException;
10 import net.kwfgrid.gworkflowdl.protocol.IllegalModificationException;
11
12 import java.rmi.RemoteException;
13
14 /***
15 Interface for a delegate object used by implementations of <code>IClientRootObject</code>
16 to delegate the protocol operations.
17 */
18 public interface IClientDelegate extends IMethodCallStrategy {
19 /***
20 Commit a modification to the server.
21 Using this method the modification is only committed to the server and the version number of the client is
22 updated accordingly. The modification is not not applied to the client structure. This has to be done before
23 or after the commit in a synchronized way.
24 @param structure The structure to modify.
25 @param modification The modification to commit.
26 @exception IncompatibleVersionsException If the specified version of the client is not equal to the version of the server.
27 @exception IllegalModificationsException If the specified modification could not be applied.
28 @exception RemoteException If the server is unreachable.
29 */
30 void commit(IClientRootObject structure, String modification) throws IllegalModificationException, IncompatibleVersionsException, RemoteException;
31
32 /***
33 Update the specified client structure to the version of the server structure.
34 @exception IllegalModificationsException If one the modifications could not be applied.
35 @exception RemoteException If the server is unreachable.
36 */
37 void update(IClientRootObject structure) throws IllegalModificationException, RemoteException;
38 }