KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > appclients > timeclient > TimeClientHandler


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: TimeClientHandler.java,v 1.1 2004/07/06 13:04:06 sauthieg Exp $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.jonas.jtests.appclients.timeclient;
26
27 import javax.xml.namespace.QName JavaDoc;
28 import javax.xml.rpc.handler.GenericHandler JavaDoc;
29 import javax.xml.rpc.handler.HandlerInfo JavaDoc;
30 import javax.xml.rpc.handler.MessageContext JavaDoc;
31
32
33
34 /**
35  *
36  *
37  * @author Guillaume Sauthier
38  */

39 public class TimeClientHandler extends GenericHandler JavaDoc {
40
41     /* (non-Javadoc)
42      * @see javax.xml.rpc.handler.Handler#init(javax.xml.rpc.handler.HandlerInfo)
43      */

44     public void init(HandlerInfo JavaDoc hinfo) {
45         String JavaDoc val = (String JavaDoc) hinfo.getHandlerConfig().get("jonas.test.client.handler");
46         StaticPassValue spv = StaticPassValue.getInstance();
47         spv.setInitValue(val);
48     }
49     
50
51     /* (non-Javadoc)
52      * @see javax.xml.rpc.handler.Handler#handleRequest(javax.xml.rpc.handler.MessageContext)
53      */

54     public boolean handleRequest(MessageContext JavaDoc mc) {
55         StaticPassValue spv = StaticPassValue.getInstance();
56         spv.setRequestValue("handlerRequest-Invoked");
57         return true;
58     }
59
60     /* (non-Javadoc)
61      * @see javax.xml.rpc.handler.Handler#handleRequest(javax.xml.rpc.handler.MessageContext)
62      */

63     public boolean handleResponse(MessageContext JavaDoc mc) {
64         StaticPassValue spv = StaticPassValue.getInstance();
65         spv.setResponseValue("handleResponse-Invoked");
66         return true;
67     }
68
69     /* (non-Javadoc)
70      * @see javax.xml.rpc.handler.Handler#getHeaders()
71      */

72     public QName JavaDoc[] getHeaders() {
73         return new QName JavaDoc[0];
74     }
75 }
76
Popular Tags