KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > context > ServiceContext


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

20
21 import org.apache.axis2.description.OperationDescription;
22 import org.apache.axis2.description.ServiceDescription;
23
24 import javax.xml.namespace.QName JavaDoc;
25
26
27 public class ServiceContext extends AbstractContext {
28     private ServiceDescription serviceConfig;
29
30     private String JavaDoc serviceInstanceID;
31
32     public ServiceContext(ServiceDescription serviceConfig, ConfigurationContext engineContext) {
33         super(engineContext);
34         this.serviceConfig = serviceConfig;
35
36
37     }
38
39
40     /**
41      * @return Returns the serviceInstanceID.
42      */

43     public String JavaDoc getServiceInstanceID() {
44         return serviceInstanceID;
45     }
46
47     /**
48      * @param serviceInstanceID The serviceInstanceID to set.
49      */

50     public void setServiceInstanceID(String JavaDoc serviceInstanceID) {
51         this.serviceInstanceID = serviceInstanceID;
52     }
53
54     /**
55      * @return
56      */

57     public ServiceDescription getServiceConfig() {
58         return serviceConfig;
59     }
60
61     public ConfigurationContext getEngineContext() {
62         return (ConfigurationContext) parent;
63     }
64
65     public OperationContext createOperationContext(QName JavaDoc name) {
66         OperationDescription axisOp = serviceConfig.getOperation(name);
67         return new OperationContext(axisOp, this);
68     }
69 }
70
Popular Tags