KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > rift > coad > daemon > servicebroker > ServiceBroker


1 /*
2  * Timer: The timer class
3  * Copyright (C) 2006-2007 Rift IT Contracting
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * ServiceBroker.java
20  */

21
22 package com.rift.coad.daemon.servicebroker;
23
24 import java.rmi.Remote JavaDoc;
25 import java.rmi.RemoteException JavaDoc;
26 import java.util.List JavaDoc;
27
28 /**
29  * The purpose of this Daemon is to allow the registration of services within a
30  * database which allows the JNDI's for those services to be retrieved.
31  *
32  * @author Glynn Chaldecott
33  */

34 public interface ServiceBroker extends Remote JavaDoc {
35     
36     /**
37      * The jndi url for the service broker.
38      */

39     public final static String JavaDoc JNDI_URL = "ServiceBroker";
40     
41     
42     /**
43      * This method is used to register a service and its JNDI on the database.
44      * It will also pass the service to it's parent.
45      *
46      * @param JNDI This is a String containing the JNDI of the service.
47      * @param services This is a List containing Strings by which the daemon is
48      * linked to the services it provides.
49      */

50     public void registerService(String JavaDoc JNDI, List JavaDoc services) throws
51             RemoteException JavaDoc, ServiceBrokerException;
52     
53     /**
54      * This method is used to retrieve the JNDI for a service by searching for
55      * the supplied Strings within the database.
56      *
57      * @param services This is a List containing Strings by which the service
58      * can be identified.
59      * @return Returns the necessary JNDI.
60      */

61     public String JavaDoc getServiceProvider(List JavaDoc services) throws RemoteException JavaDoc,
62             ServiceBrokerException;
63     
64     /**
65      * This method is used to retrieve multiple JNDI values from the database.
66      *
67      * @param services This is a List containing Strings by which the service
68      * can be identified.
69      * @return Returns a list of multiple JNDI's.
70      */

71     public List JavaDoc getServiceProviders(List JavaDoc services) throws RemoteException JavaDoc,
72             ServiceBrokerException;
73     
74     /**
75      * This method is used to remove a service from the database.
76      *
77      * @param JNDI This is a string containing the JNDI of the service you wish
78      * to remove.
79      * @param services This is a List of the services that are linked to that
80      * JNDI.
81      */

82     public void removeServiceProviders(String JavaDoc JNDI, List JavaDoc services) throws
83             RemoteException JavaDoc, ServiceBrokerException;
84     
85 }
86
Popular Tags