KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mr > kernel > world > WorldModelerMBean


1 /*
2  * Copyright 2002 by
3  * <a HREF="http://www.coridan.com">Coridan</a>
4  * <a HREF="mailto: support@coridan.com ">support@coridan.com</a>
5  *
6  * The contents of this file are subject to the Mozilla Public License Version
7  * 1.1 (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  * http://www.mozilla.org/MPL/
10  *
11  * Software distributed under the License is distributed on an "AS IS" basis,
12  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13  * for the specific language governing rights and limitations under the
14  * License.
15  *
16  * The Original Code is "MantaRay" (TM).
17  *
18  * The Initial Developer of the Original Code is lital kasif.
19  * Portions created by the Initial Developer are Copyright (C) 2006
20  * Coridan Inc. All Rights Reserved.
21  *
22  * Contributor(s): all the names of the contributors are added in the source
23  * code where applicable.
24  *
25  * Alternatively, the contents of this file may be used under the terms of the
26  * LGPL license (the "GNU LESSER GENERAL PUBLIC LICENSE"), in which case the
27  * provisions of LGPL are applicable instead of those above. If you wish to
28  * allow use of your version of this file only under the terms of the LGPL
29  * License and not to allow others to use your version of this file under
30  * the MPL, indicate your decision by deleting the provisions above and
31  * replace them with the notice and other provisions required by the LGPL.
32  * If you do not delete the provisions above, a recipient may use your version
33  * of this file under either the MPL or the GNU LESSER GENERAL PUBLIC LICENSE.
34  
35  *
36  * This library is free software; you can redistribute it and/or modify it
37  * under the terms of the MPL as stated above or under the terms of the GNU
38  * Lesser General Public License as published by the Free Software Foundation;
39  * either version 2.1 of the License, or any later version.
40  *
41  * This library is distributed in the hope that it will be useful, but WITHOUT
42  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
43  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
44  * License for more details.
45  */

46 /*
47  * Created on Nov 17, 2004
48  *
49  */

50 package org.mr.kernel.world;
51
52 import java.util.List JavaDoc;
53 import java.util.Set JavaDoc;
54
55 import org.mr.core.net.TransportInfo;
56 import org.mr.kernel.services.MantaService;
57
58 /**
59  * TODO To change the template for this generated type comment go to
60  * Window - Preferences - Java - Code Style - Code Templates
61  *
62  * @author lital kasif
63  *
64  */

65 public interface WorldModelerMBean {
66
67     public abstract void addAgent(String JavaDoc domain , String JavaDoc agentName , List JavaDoc transportInfo);
68 /**
69  * removes an agent and all of it transpot info
70  * @param domain the domain of the agent
71  * @param agentName the name of the agent
72  */
public abstract void removeAgent(String JavaDoc domain, String JavaDoc agentName) ;
73 /**
74  * adds transport info to an existing agent or creating an agent entry and adding it to it
75  * @param domain the domain this agent belongs to
76  * @param agentName the unique id of this agent
77  * @param info the transport informaintion known about this agent
78  */
public abstract boolean addTransportInfoToAgent(String JavaDoc domain , String JavaDoc agentName ,TransportInfo info);
79 /**
80  * removes an agent transport info from his transport list
81  * @param domain the domain this agent belogs too
82  * @param agentName the agent name
83  * @param info the transport info to be removed
84  */
public abstract boolean removeTransportInfoFromAgent(String JavaDoc domain , String JavaDoc agentName ,TransportInfo info);
85 /**
86  * returns a list of all the transport information know about this agent
87  * @param domain the domain this agent belongs to
88  * @param agentName the unique id of this agent
89  * @return a list of TransportInfo objects or null if not found
90  */
public abstract Set JavaDoc getAgentTransportInfo(String JavaDoc domain , String JavaDoc agentName);
91 /**
92  * returns a set of agents name of a given domain
93  * @param domain - the domain we want the list of
94  * @return a set of agents name for this domain
95  */
public abstract Set JavaDoc getAgents(String JavaDoc domain);
96  /**
97  * @return a set of services of a given domain
98  */

99 public abstract Set JavaDoc getServices(String JavaDoc domain);
100 /**
101  * @return the manta service with that name in that domain or null if not found
102  */
public abstract MantaService getService(String JavaDoc domain ,String JavaDoc service, byte serviceType);
103  /**
104  * adds the service to the world map if the service is not already there
105  * @param domain the domain of the service
106  * @param service the service to be added
107  */
public abstract void addService(String JavaDoc domain ,MantaService service);
108 /**
109  * removes a queue or a topic from the World Modeler and notifies the
110  * logical listener
111  * @param domain the domain of the service
112  * @param serviceName the name of the queue or the topic
113  */
public abstract void removeService(String JavaDoc domain, String JavaDoc serviceName) ;
114
115  public abstract String JavaDoc getDefaultDomainName() ;
116 /**
117  * @param defaultDomain The defaultDomain to set.
118  */
public abstract void setDefaultDomainName(String JavaDoc defaultDomain) ;
119 /**
120  * @return Returns the myAgentName.
121  */
public abstract String JavaDoc getMyAgentName() ;
122 /**
123  * @param myAgentName The myAgentName to set.
124  */
public abstract void setMyAgentName(String JavaDoc myAgentName) ;
125 /*/**
126  * adds a domain with no agent
127  * @param domainName
128  *
129  public abstract MantaDomain addDomain(String domainName);
130 public abstract void removeDomain(String domainName);
131 /**
132  * gets the domains from the world map
133  * @return a set of MantaDomain objects
134  *
135  *public abstract Set getDomains();
136  
137 public abstract MantaDomain getDomain(String domainName);
138 */

139 /**
140  * @return Returns the myConsumedServices.
141  */
public abstract Set JavaDoc getMyConsumedServices() ;
142 /**
143  * @return Returns the myProducedServices.
144  */
public abstract Set JavaDoc getMyProducedServices() ;
145 /**
146  * @return Returns the myCoordinatedServices.
147  */
public abstract Set JavaDoc getMyCoordinatedServices() ;}
Popular Tags