KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > wsm > axis > handlers > HandlerHandler


1 /*
2  * HandlerHandler.java
3  *
4  * Copyright 2001-2004 The Apache Software Foundation.
5  *
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * 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 package org.apache.beehive.wsm.axis.handlers;
21
22 import org.apache.axis.handlers.JAXRPCHandler;
23 import org.apache.beehive.wsm.model.BeehiveWsSOAPMessageHandlerInfo;
24 import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
25 import org.apache.beehive.wsm.model.jsr181.SOAPMessageHandlerInfo;
26
27 /**
28  * ****************************************************************************
29  * Yes, this class name is a bit silly in order to highlight the confusion
30  * caused by overloading the term "Handler" used both by jaxrpc and AXIS.
31  * Might as well embrace the insanity rather than using an equally uninteresting
32  * name like HandlerManager or something.
33  *
34  * @author Jonathan Colwell
35  */

36 public class HandlerHandler extends JAXRPCHandler {
37
38     private BeehiveWsTypeMetadata wsm;
39
40     /**
41      * Constructor with Jsr181TypeMetadata parameter
42      *
43      * @param wsm
44      */

45     public HandlerHandler(BeehiveWsTypeMetadata wsm) {
46         this.wsm = wsm;
47     }
48
49     /**
50      * Uses the soap handler configuration information in the metadata to
51      * configure the HandlerChain.
52      */

53     public void init() {
54         for (BeehiveWsSOAPMessageHandlerInfo info : wsm.getSoapHandlers()) {
55             addNewHandler(info.getClassName(), info.getParameterMap());
56         }
57     }
58 }
59
Popular Tags