1 26 27 28 package org.objectweb.mobilitools.smi; 29 30 31 import org.objectweb.mobilitools.smi.api.*; 32 import java.util.Properties ; 33 34 35 40 public class AgentEntry implements AgentInfo 41 { 42 MobileObject agent; 43 Name name; 44 String place; 45 boolean running; 46 String codebase; 47 Properties properties; 48 Object data; 49 50 51 60 public AgentEntry( 61 MobileObject agent, 62 Name name, 63 String place, 64 boolean running, 65 String codebase, 66 Properties properties) 67 { 68 this(agent, name, place, running, codebase, properties, null); 69 } 70 71 72 81 public AgentEntry( 82 MobileObject agent, 83 Name name, 84 String place, 85 boolean running, 86 String codebase, 87 Properties properties, 88 Object data) 89 { 90 this.agent = agent; 91 this.name = name; 92 this.place = place; 93 this.running = running; 94 this.codebase = codebase; 95 this.properties = properties; 96 this.data = data; 97 } 98 99 100 103 public MobileObject getAgent() 104 { 105 return agent; 106 } 107 108 109 112 public Name getName() 113 { 114 return name; 115 } 116 117 118 121 public String getPlace() 122 { 123 return place; 124 } 125 126 127 131 public boolean isRunning() 132 { 133 return running; 134 } 135 136 137 141 public boolean toggleRunning() 142 { 143 return running = ! running; 144 } 145 146 147 150 public String getCodebase() 151 { 152 return codebase; 153 } 154 155 156 159 public Properties getProperties() 160 { 161 return properties; 162 } 163 164 165 168 public Object getData() 169 { 170 return data; 171 } 172 } 173 | Popular Tags |