View Javadoc

1   /**********************************************************************
2    * MultiObjectHandler.java
3    * created on 07.08.2004 by netseeker
4    * $Source: /cvsroot/ejoe/EJOE/src/de/netseeker/ejoe/handler/MultiObjectHandler.java,v $
5    * $Date: 2006/11/05 16:59:31 $
6    * $Revision: 1.6 $
7    *
8    * ====================================================================
9    *
10   *  Copyright 2005-2006 netseeker aka Michael Manske
11   *
12   *  Licensed under the Apache License, Version 2.0 (the "License");
13   *  you may not use this file except in compliance with the License.
14   *  You may obtain a copy of the License at
15   *
16   *      http://www.apache.org/licenses/LICENSE-2.0
17   *
18   *  Unless required by applicable law or agreed to in writing, software
19   *  distributed under the License is distributed on an "AS IS" BASIS,
20   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21   *  See the License for the specific language governing permissions and
22   *  limitations under the License.
23   * ====================================================================
24   *
25   * This file is part of the ejoe framework.
26   * For more information on the author, please see
27   * <http://www.manskes.de/>.
28   *
29   *********************************************************************/
30  
31  package de.netseeker.ejoe.handler;
32  
33  import java.util.Map;
34  
35  /***
36   * A simple base class for server handlers which have to deal with multiple input objects and return values
37   * 
38   * @author netseeker aka Michael Manske
39   * @since 0.3.0
40   */
41  public abstract class MultiObjectHandler implements ServerHandler
42  {
43      /***
44       * Simply casts the given input object into a map
45       * 
46       * @see de.netseeker.ejoe.handler.ServerHandler#handle(java.lang.Object)
47       */
48      public Object handle( Object obj )
49      {
50          return execute( (Map) obj );
51      }
52  
53      public abstract Map execute( Map objects );
54  }