01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * 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 5079 2004-07-06 13:04:06Z sauthieg $
23: * --------------------------------------------------------------------------
24: */package org.objectweb.jonas.jtests.appclients.timeclient;
25:
26: import javax.xml.namespace.QName;
27: import javax.xml.rpc.handler.GenericHandler;
28: import javax.xml.rpc.handler.HandlerInfo;
29: import javax.xml.rpc.handler.MessageContext;
30:
31: /**
32: *
33: *
34: * @author Guillaume Sauthier
35: */
36: public class TimeClientHandler extends GenericHandler {
37:
38: /* (non-Javadoc)
39: * @see javax.xml.rpc.handler.Handler#init(javax.xml.rpc.handler.HandlerInfo)
40: */
41: public void init(HandlerInfo hinfo) {
42: String val = (String) hinfo.getHandlerConfig().get(
43: "jonas.test.client.handler");
44: StaticPassValue spv = StaticPassValue.getInstance();
45: spv.setInitValue(val);
46: }
47:
48: /* (non-Javadoc)
49: * @see javax.xml.rpc.handler.Handler#handleRequest(javax.xml.rpc.handler.MessageContext)
50: */
51: public boolean handleRequest(MessageContext mc) {
52: StaticPassValue spv = StaticPassValue.getInstance();
53: spv.setRequestValue("handlerRequest-Invoked");
54: return true;
55: }
56:
57: /* (non-Javadoc)
58: * @see javax.xml.rpc.handler.Handler#handleRequest(javax.xml.rpc.handler.MessageContext)
59: */
60: public boolean handleResponse(MessageContext mc) {
61: StaticPassValue spv = StaticPassValue.getInstance();
62: spv.setResponseValue("handleResponse-Invoked");
63: return true;
64: }
65:
66: /* (non-Javadoc)
67: * @see javax.xml.rpc.handler.Handler#getHeaders()
68: */
69: public QName[] getHeaders() {
70: return new QName[0];
71: }
72: }
|