1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.backsource.amsterdam.service.strategy;
22 import org.backsource.amsterdam.metadata.ContentMapEntry;
23 import org.backsource.amsterdam.service.ServiceInvoker;
24 import org.backsource.amsterdam.service.ServiceMessage;
25 import org.backsource.amsterdam.service.ServiceException;
26 import org.backsource.amsterdam.service.protocol.ProtocolHandler;
27 import org.backsource.amsterdam.service.protocol.ListEntry;
28 /***
29 * Every method does nothing.
30 *
31 *
32 * @author <a href="mailto:pra@mogul.com">Peter Antman</a>
33 * @version $Revision: 1.1.1.1 $
34 */
35
36 public class PassThroughStrategy implements HandlerStrategy {
37 protected ServiceInvoker invoker = null;
38 public PassThroughStrategy (){
39
40 }
41 public ServiceInvoker getServiceInvoker() {return invoker;}
42
43 public void setServiceInvoker(ServiceInvoker invoker) {
44 this.invoker = invoker;
45 }
46 /***
47 * Invoked before doing a list
48 *
49 * Does nothing
50 */
51 public void begin(ProtocolHandler handler, ContentMapEntry contentEntry) throws ServiceException {}
52 /***
53 * Invoked before doing a get
54 *
55 * Does nothing
56 */
57 public boolean preGet(ProtocolHandler handler, ListEntry listEntry)throws ServiceException{return true;}
58 /***
59 * Invoked before the message is sent down the chain
60 *
61 * Does nothing
62 */
63 public boolean preInvoke(ProtocolHandler handler, ServiceMessage message) throws ServiceException{return true;}
64 /***
65 * Invoked when message handling has sucessfully returned,
66 * the response may be filled in in the message
67 *
68 * Does nothing
69 */
70 public void commit(ProtocolHandler handler, ServiceMessage message) throws ServiceException{}
71 /***
72 * Invoked when the handling somehow did not succed
73 *
74 * Does nothing
75 */
76 public void rollback(ProtocolHandler handler, ListEntry listEntry){}
77 }