KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > ext > wsmgmt > WebServiceMgr


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.appserv.management.ext.wsmgmt;
24
25 import java.util.Map JavaDoc;
26 import java.util.Set JavaDoc;
27
28 import com.sun.appserv.management.base.AMX;
29 import com.sun.appserv.management.base.Container;
30 import com.sun.appserv.management.base.Singleton;
31 import com.sun.appserv.management.base.XTypes;
32
33 import com.sun.appserv.management.j2ee.WebServiceEndpoint;
34
35 /**
36  * WebServiceMgr is used to obtained information about web service end points
37  * that are deployed. For each web service end point, name, URI, type of web
38  * service implementation (EJB or Servlet), EJB or Servlet name, descriptor
39  * locations etc. can be obtained.
40  * <br>
41  * This WebServiceMgr can also be used to create Self Management rules.
42  *
43  * @since AppServer 9.0
44  */

45 public interface WebServiceMgr extends AMX, Singleton
46 {
47     /** The j2eeType of WebServiceMgr */
48     public static final String JavaDoc J2EE_TYPE = XTypes.WEB_SERVICE_MGR;
49
50     /**
51      * Returns a map of web service endpoint keys and their display names.
52      * It returns information for all deployed web service endpoints in the
53      * domain.
54      *
55      * @return a map of web service endpoint keys and their display names
56      * This returned key is opaque. This is of form
57      * ApplicationID#ModuleID#WebServiceEndpointName or
58      * ModuleID#WebServiceEndpointName
59      */

60     public Map JavaDoc<Object JavaDoc,String JavaDoc> getWebServiceEndpointKeys();
61
62     /**
63      * Returns the {@link WebServiceEndpointInfo} for a web service endpoint.
64      *
65      * @param key The web service endpoint's key.
66      * This is opaque key. This is of form
67      * ApplicationID#ModuleID#WebServiceEndpointName or
68      * ModuleID#WebServiceEndpointName
69      * This is returned from getWebServiceEndpointKeys
70      *
71      * @return {@link WebServiceEndpointInfo} as Map which is mapped by keys in interface {@link
72      * WebServiceEndpointInfo}
73      @deprecated should not use proprietary types over the wire
74      */

75     public WebServiceEndpointInfo getWebServiceEndpointInfo(Object JavaDoc key);
76
77     
78     /**
79      * Returns the set of {@link WebServiceEndpoint} runtime mbeans for
80      * the specified Web Service Endpoint key on the specified server instance.
81      *
82      * @param webServiceEndpointKey Web Service Endpoint Key
83      * @param serverName Name of the server instance. To specify
84      * all server instances, use
85      * {@link #ALL_SERVERS}
86      *
87      * @return Set of WebServiceEndpoint runtime mbeans
88      */

89     public Set JavaDoc<WebServiceEndpoint> getWebServiceEndpointSet(
90         Object JavaDoc webServiceEndpointKey, String JavaDoc serverName);
91
92
93     /**
94      * Returns list of configured web service registry access points.
95      *
96      * @return list of configured web service registry access points
97      */

98     public String JavaDoc[] listRegistryLocations();
99
100     /**
101      * Publishes the WSDL of webService to the registries specified by the
102      * JNDI Names
103      *
104      * @param registryLocations array of jndi names of the connector resources
105      * pointing to different registries
106      *
107      * @param webServiceEndpointKey web service endpoint(key) whose WSDL has to
108      * be published;
109      * format is appName#moduleName#webserviceName
110      * This is opaque, as returned by the method getWebServiceEndpointKeys
111      *
112      * @param optional map contains the following:
113      * <pre>
114      * lbhost, host name or ip address of the loadbalancer where this
115      * service is publicly exposed
116      * lbport, loadbalancer port used to expose this service
117      * lbsslport, secure port in loadbalancer used to expose this service
118      * categories, Categories under which this web service endpoint should be
119      * published. This is an array of Strings.
120      * description, Description of the web service endpoint
121      * organization, Name of the Organization that the web service should be
122      * published under.
123      * </pre>
124      */

125     public void publishToRegistry (String JavaDoc[] registryLocations,
126                 Object JavaDoc webServiceEndpointKey, Map JavaDoc<String JavaDoc,String JavaDoc> optional);
127
128     /**
129      * Unpublish WSDL of the specified webservice from the registries specified
130      * via their JNDI names
131      *
132      * @param registryLocations array of jndi names of the connector resources
133      * pointing to different registries
134      *
135      * @param webServiceEndpointKey web service endpoint(key) whose WSDL has to
136      * be published; format is appName#moduleName#webserviceName
137      * This is opaque, as returned by the method getWebServiceEndpointKeys
138      */

139     public void unpublishFromRegistry(String JavaDoc[] registryLocations,
140             Object JavaDoc webServiceEndpointKey);
141
142     /*
143      * Given the jndi name of the registry, this undeploys the connection pool created for
144      * it. The Resource Adapter associated is not undeployed lest other connection pools
145      * are referencing it.
146      */

147     public void removeRegistryConnectionResources (String JavaDoc jndiNameOfRegistry);
148   
149    /**
150      * Adds registry specific resources to the domain.
151      * Adds a connector connection pool and then proceeds to add a connector
152      * resource
153      *
154      * @param jndiName of the connector-resource that points to the registry
155      * @param description of the connector-resource and the connector-connection-pool name
156      * @param type type of registry: {@link #UDDI_KEY}, {@link #EBXML_KEY}
157      * @param properties a map of key, value pair that encapsulate the properties
158      * of the connection pool that connects to the registry. Properties are
159      * {@link #PUBLISH_URL_KEY}, {@link #QUERY_URL_KEY}, {@link #USERNAME_KEY},{@link #PASSWORD_KEY}
160      */

161     public void addRegistryConnectionResources(String JavaDoc jndiName,
162             String JavaDoc description, String JavaDoc type, Map JavaDoc<String JavaDoc, String JavaDoc> properties);
163             
164     /**
165      * A constant to denote all servers.
166      */

167     public final static String JavaDoc ALL_SERVERS = "*";
168
169     /**
170      * host name or ip address of the loadbalancer where this
171      * service is publicly exposed
172      */

173      public final static String JavaDoc LB_HOST_KEY = "LBHost";
174  
175     /**
176      * loadbalancer port used to expose this service
177      */

178      public final static String JavaDoc LB_PORT_KEY = "LBPort";
179
180     /**
181      * secure port in loadbalancer used to expose this service
182      */

183      public final static String JavaDoc LB_SECURE_PORT = "LBSecurePort";
184
185     /**
186      * Categories under which this web service endpoint should be published.
187      * This is an array of Strings.
188      */

189      public final static String JavaDoc CATEGORIES_KEY = "Categories";
190
191     /**
192      * Description of the web service endpoint
193      */

194      public final static String JavaDoc DESCRIPTION_KEY = "Description";
195
196     /**
197      * Organization Name under which the webservice should be
198      * published. Required for a UDDI registry.
199      */

200      public final static String JavaDoc ORGANIZATION_KEY = "Organization";
201
202      /**
203       * URL of the registry where publish requests are dispatched
204       * This is converted internally by the connector to
205       * JAXR implementation specific property
206       * <i>javax.xml.registry.lifeCycleManagerURL</i>
207       */

208      public static final String JavaDoc PUBLISH_URL_KEY = "LifeCycleManagerURL";
209
210      /*
211       * URL of the registry where query requests are dispatched
212       * This is converted internally by the connector to
213       * JAXR implementation specific property
214       * <i>javax.xml.registry.queryManagerURL</i>
215       */

216      public static final String JavaDoc QUERY_URL_KEY = "QueryManagerURL";
217
218
219      /**
220       * Username to publish to registry
221       */

222      public static final String JavaDoc USERNAME_KEY = "username";
223
224      /**
225       * Password to publish to registry
226       */

227      public static final String JavaDoc PASSWORD_KEY = "password";
228
229      /*
230       * UDDI Key
231       */

232      public static final String JavaDoc UDDI_KEY = "uddi";
233
234      /*
235       * UDDI Key
236       */

237      public static final String JavaDoc EBXML_KEY = "ebxml";
238
239
240      
241 }
242
Popular Tags