KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > sandesha > intergratedtest > RMTestService


1 /*
2 * Copyright 1999-2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License. You may obtain a copy of
6 * the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 *
16 */

17
18 package org.apache.sandesha.intergratedtest;
19
20 import org.apache.axis.components.logger.LogFactory;
21 import org.apache.commons.logging.Log;
22
23 import java.util.HashMap JavaDoc;
24 import java.util.Map JavaDoc;
25
26
27 public class RMTestService {
28     private static Map JavaDoc sequences = new HashMap JavaDoc();
29     private static final Log log = LogFactory.getLog(RMTestService.class.getName());
30
31     public String JavaDoc echoString(String JavaDoc text, String JavaDoc sequence) {
32
33         if (sequences.get(sequence) != null) {
34             text = (String JavaDoc) sequences.get(sequence) + text;
35             sequences.put(sequence, new String JavaDoc(text));
36         } else {
37             sequences.put(sequence, (new String JavaDoc(text)));
38
39         }
40         if (log.isDebugEnabled()) {
41             log.debug("ECHO-STRING SERVICE " + text);
42         }
43         return text;
44     }
45
46     public void ping(String JavaDoc text) {
47         if (log.isDebugEnabled()) {
48             log.debug("PING-STRING SERVICE " + text);
49         }
50     }
51 }
52
Popular Tags