01: /*
02: * (C) Copyright 2000 - 2005 Nabh Information Systems, Inc.
03: *
04: * This program is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU General Public License
06: * as published by the Free Software Foundation; either version 2
07: * of the License, or (at your option) any later version.
08: *
09: * This program is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13: *
14: * You should have received a copy of the GNU General Public License
15: * along with this program; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17: *
18: */
19: package com.nabhinc.ws.server;
20:
21: import java.util.List;
22:
23: import com.nabhinc.ws.core.WebServiceException;
24:
25: /**
26: * A directory of Web services running in the local server.
27: *
28: * @author Padmanabh Dabke
29: * (c) 2005 Nabh Information Systems, Inc. All Rights Reserved.
30: */
31: public interface WebServiceDirectory extends ServerObject {
32:
33: /**
34: * Register a Web service under the name supplied by
35: * <code>WebServiceInfo</code>.
36: *
37: * @param sInfo
38: * Web service info providing name and meta-data of the service
39: * to be registered.
40: * @throws ServletException
41: */
42: void register(WebServiceInfo sInfo) throws WebServiceException;
43:
44: /**
45: * Unregister the Web service with given name
46: *
47: * @param name
48: * Name of the service to be unregistered
49: * @throws ServletException
50: */
51: void unregister(String name) throws WebServiceException;
52:
53: /**
54: * Look up a service by it's name.
55: *
56: * @param name
57: * Web service name
58: * @return WebServiceInfo if found, null otherwise.
59: * @throws ServletException
60: */
61: WebServiceInfo lookup(String name) throws WebServiceException;
62:
63: /**
64: * Look up a service by it's type/class.
65: *
66: * @param name
67: * Web service class/interface
68: * @return WebService if found, null otherwise.
69: * @throws ServletException
70: */
71: WebServiceInfo lookupByType(Class c) throws WebServiceException;
72:
73: /**
74: * Returns an unmodifiable list of WebServiceInfo objects that
75: * are registered with this directory
76: * @return Unmodifiable list of registered WebServiceInfo objects.
77: * @throws ServletException
78: */
79: List getWebServiceInfoList() throws WebServiceException;
80: }
|