1 package cz.cuni.amis.pogamut.base.utils; 2 3 import java.io.InputStreamReader; 4 5 import cz.cuni.amis.pogamut.base.communication.connection.impl.socket.SocketConnection; 6 import cz.cuni.amis.pogamut.base.utils.logging.AgentLogger; 7 import cz.cuni.amis.pogamut.base.utils.logging.NetworkLogClient; 8 import cz.cuni.amis.pogamut.base.utils.logging.NetworkLogManager; 9 10 /** 11 * The key is returned via {@link PogamutProperty#toString()} method. 12 * 13 * @author Jimmy 14 */ 15 public enum PogamutProperty { 16 17 18 /** 19 * Default logging level for the bot, set inside {@link AgentLogger#AgentLogger(cz.cuni.amis.pogamut.base.agent.IAgentId)} constructor. 20 */ 21 POGAMUT_LOGGER_LEVEL_DEFAULT("pogamut.logger.level.default"), 22 23 /** 24 * Domain used for MBeans registered from the Pogamut. 25 */ 26 POGAMUT_JMX_DOMAIN("pogamut.jmx.domain"), 27 28 /** 29 * Subdomain used for agent MBean registered from the Pogamut. 30 */ 31 POGAMUT_JMX_SUBDOMAIN("pogamut.jmx.subdomain"), 32 33 /** 34 * Port of the RMI registry. 35 */ 36 POGAMUT_JMX_SERVER_RMI_PORT("pogamut.jmx.server.rmi.port"), 37 38 /** 39 * address where the JMX server will run this should be the global IP since 40 * other tools might want to use this address if blank than some IP will be choosen 41 * automatically. 42 */ 43 POGAMUT_JMX_SERVER_ADDRESS("pogamut.jmx.server.address"), 44 45 /** 46 * Changes the log level of the {@link NetworkLogManager} singleton and {@link NetworkLogClient} instances. 47 */ 48 POGAMUT_NETWORK_LOG_MANAGER_AND_CLIENT_LEVEL("pogamut.network.log.level"), 49 50 /** 51 * Which encoding to use when reading Strings, use things like windows-1250, utf8, etc... anything that Charset.forName() accepts at your platform 52 * 'default' is reserved for Charset.defaultCharset(). 53 * <br/><br/> 54 * Used by {@link SocketConnection} for {@link InputStreamReader#InputStreamReader(java.io.InputStream, java.nio.charset.Charset)} and Writer. 55 */ 56 POGAMUT_SOCKETCONNECTION_ENCODING("pogamut.socketconnection.encoding") 57 // 58 // /** 59 // * Whether to use NormalizerAscii to convert non-ascii chars to ascii. Used by {@link SocketConnection}. NOT IMPLEMENTED YET 60 // */ 61 // POGAMUT_SOCKETCONNECTION_NORMALIZE_ASCII("pogamut.socketconnection.normalize.ascii") 62 ; 63 64 private String key; 65 66 private PogamutProperty(String key) { 67 this.key = key; 68 } 69 70 public String getKey() { 71 return key; 72 } 73 74 public String toString() { 75 return key; 76 } 77 78 }