KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > servicemix > soap > Context


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

17 package org.apache.servicemix.soap;
18
19 import java.util.HashMap JavaDoc;
20 import java.util.Map JavaDoc;
21
22 import org.apache.servicemix.soap.marshalers.SoapMessage;
23
24 /**
25  *
26  * @author Guillaume Nodet
27  * @version $Revision: 1.5 $
28  * @since 3.0
29  */

30 public class Context {
31
32     public static final String JavaDoc SOAP_IN = "org.apache.servicemix.SoapIn";
33     public static final String JavaDoc SOAP_OUT = "org.apache.servicemix.SoapOut";
34     public static final String JavaDoc SOAP_FAULT = "org.apache.servicemix.SoapFault";
35     public static final String JavaDoc INTERFACE = "org.apache.servicemix.Interface";
36     public static final String JavaDoc OPERATION = "org.apache.servicemix.Operation";
37     public static final String JavaDoc SERVICE = "org.apache.servicemix.Service";
38     public static final String JavaDoc ENDPOINT = "org.apache.servicemix.Endpoint";
39     
40     public static final String JavaDoc AUTHENTICATION_SERVICE = "org.apache.servicemix.AuthenticationService";
41     public static final String JavaDoc KEYSTORE_MANAGER = "org.apache.servicemix.KeystoreManager";
42     
43     private Map JavaDoc properties;
44     
45     public Context() {
46         this.properties = new HashMap JavaDoc();
47     }
48     
49     public SoapMessage getInMessage() {
50         return (SoapMessage) getProperty(SOAP_IN);
51     }
52     
53     public SoapMessage getOutMessage() {
54         return (SoapMessage) getProperty(SOAP_OUT);
55     }
56     
57     public SoapMessage getFaultMessage() {
58         return (SoapMessage) getProperty(SOAP_FAULT);
59     }
60     
61     public void setInMessage(SoapMessage message) {
62         setProperty(SOAP_IN, message);
63     }
64     
65     public void setOutMessage(SoapMessage message) {
66         setProperty(SOAP_OUT, message);
67     }
68     
69     public void setFaultMessage(SoapMessage message) {
70         setProperty(SOAP_FAULT, message);
71     }
72     
73     public Object JavaDoc getProperty(String JavaDoc name) {
74         return properties.get(name);
75     }
76     
77     public void setProperty(String JavaDoc name, Object JavaDoc value) {
78         properties.put(name, value);
79     }
80     
81 }
82
Popular Tags