2011/08/05 - Jakarta Cactus has been retired.

For more information, please explore the Attic.

View Javadoc

1   /* 
2    * ========================================================================
3    * 
4    * Licensed to the Apache Software Foundation (ASF) under one or more
5    * contributor license agreements.  See the NOTICE file distributed with
6    * this work for additional information regarding copyright ownership.
7    * The ASF licenses this file to You under the Apache License, Version 2.0
8    * (the "License"); you may not use this file except in compliance with
9    * the License.  You may obtain a copy of the License at
10   * 
11   *   http://www.apache.org/licenses/LICENSE-2.0
12   * 
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   * 
19   * ========================================================================
20   */
21  package org.apache.cactus;
22  
23  import java.io.Serializable;
24  import java.util.Hashtable;
25  
26  import org.apache.cactus.Request;
27  
28  /**
29   * Prototype of EJBRedirector for Cactus.
30   * @author Siddhartha P. Chandurkar (siddhartha@visioncodified.com)
31   */
32  public class EJBRequest implements Request, Serializable 
33  {
34  
35      /**
36       * Request parameters are stored here.
37       */
38      private Hashtable requestMaps;
39  
40      /**
41       * Default constructor.
42       */
43      public EJBRequest() 
44      {
45          requestMaps = new Hashtable();
46      }
47  
48      /**
49       * A method to set the name of the class as a request parameter.
50       * @param theClassKey
51       * @param theName
52       */
53      public void setClassName(String theClassKey, String theName)
54      {
55          requestMaps.put(theClassKey, theName);
56      }
57      
58      /**
59       * A method to get the name of the class as a request parameter.
60       * @param theClassKey
61       * @return
62       */
63      public String getClassName(String theClassKey) 
64      {
65          return (String) requestMaps.get(theClassKey);
66      }
67      
68      /**
69       * A method to set the name of the test-method.
70       * @param theMethodKey
71       * @param theName
72       */
73      public void setMethodName(String theMethodKey, String theName) 
74      {
75          requestMaps.put(theMethodKey, theName);
76      }
77      
78      /**
79       * Getter method for the name of the test-method.
80       * @param theMethodKey
81       * @return
82       */
83      public String getMethodName(String theMethodKey) 
84      {
85          return (String) requestMaps.get(theMethodKey);
86      }
87  }
88