1 26 27 28 package org.objectweb.mobilitools.smi; 29 30 31 import org.omg.CfMAF.*; 32 import org.omg.CORBA.*; 33 import org.objectweb.mobilitools.smi.idl.*; 34 35 36 42 public class MAFFinder_impl extends _MAFFinderComplementImplBase 43 implements MAFFinderOperations, MAFFinderComplementOperations 44 { 45 Finder myFinder; 46 47 48 public MAFFinder_impl(Finder finder) 49 { 50 myFinder = finder; 51 } 52 53 54 58 59 62 public void register_agent( 63 Name agent_name, 64 String agent_location, 65 AgentProfile agent_profile) 66 throws NameInvalid 67 { 68 myFinder.register(new FinderEntry(agent_name, agent_location, agent_profile)); 69 } 70 71 72 75 public void register_agent_system( 76 Name agent_system_name, 77 String agent_system_location, 78 AgentSystemInfo agent_system_info) 79 throws NameInvalid 80 { 81 myFinder.register(new FinderEntry(agent_system_name, agent_system_location, agent_system_info)); 82 } 83 84 85 88 public void register_place( 89 String place_name, 90 String place_location) 91 throws NameInvalid, NO_IMPLEMENT 92 { 93 throw new NO_IMPLEMENT("MAFFinder operations for place management are not implemented."); 94 } 95 96 97 102 public String [] lookup_agent( 103 Name agent_name, 104 AgentProfile agent_profile) 105 throws EntryNotFound 106 { 107 return myFinder.lookup_locations(new org.objectweb.mobilitools.smi.api.Name(agent_name), null, agent_profile); 108 } 109 110 111 116 public String [] lookup_agent_system( 117 Name agent_system_name, 118 AgentSystemInfo agent_system_info) 119 throws EntryNotFound 120 { 121 return myFinder.lookup_locations(new org.objectweb.mobilitools.smi.api.Name(agent_system_name), null, agent_system_info); 122 } 123 124 125 128 public String [] lookup_place(String place_name) 129 throws EntryNotFound, NO_IMPLEMENT 130 { 131 throw new NO_IMPLEMENT("MAFFinder operations for place management are not implemented."); 132 } 133 134 135 138 public void unregister_agent(Name agent_name) 139 throws EntryNotFound 140 { 141 myFinder.unregister(new org.objectweb.mobilitools.smi.api.Name(agent_name)); 142 } 143 144 145 148 public void unregister_agent_system(Name agent_system_name) 149 throws EntryNotFound 150 { 151 myFinder.unregister(new org.objectweb.mobilitools.smi.api.Name(agent_system_name)); 152 } 153 154 155 158 public void unregister_place(String place_name) 159 throws EntryNotFound, NO_IMPLEMENT 160 { 161 throw new NO_IMPLEMENT("MAFFinder operations for place management are not implemented."); 162 } 163 164 165 169 170 public Name[] lookup_agent_names(AgentProfile profile) 171 { 172 return myFinder.lookup_names(profile); 173 } 174 175 176 public AgentProfile get_agent_profile(Name name) 177 throws AgentNotFound 178 { 179 return myFinder.getAgentProfile(new org.objectweb.mobilitools.smi.api.Name(name)); 180 } 181 } 182 | Popular Tags |