View Javadoc

1   
2   /*
3    * Copyright (c) 2004 Peter Antman, Mogul  <peter.antman@mogul.com>
4    *
5    * $Id: PassThroughStrategy.java,v 1.1.1.1 2004/05/19 12:22:46 pra Exp $
6    *
7    * This library is free software; you can redistribute it and/or
8    * modify it under the terms of the GNU Lesser General Public
9    * License as published by the Free Software Foundation; either
10   * version 2 of the License, or (at your option) any later version
11   * 
12   * This library is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15   * Lesser General Public License for more details.
16   * 
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this library; if not, write to the Free Software
19   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 {}//NOOP
52     /***
53      * Invoked before doing a get
54      *
55      * Does nothing
56      */
57     public boolean preGet(ProtocolHandler handler, ListEntry listEntry)throws ServiceException{return true;}//NOOP
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;}//NOOP
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{}//NOOP
71     /***
72      * Invoked when the handling somehow did not succed
73      *
74      * Does nothing
75      */
76     public void rollback(ProtocolHandler handler, ListEntry listEntry){}//NOOP
77  }// PassThroughStrategy