diff --git a/src/net/i2p/itoopie/i2pcontrol/methods/I2PControl.java b/src/net/i2p/itoopie/i2pcontrol/methods/I2PControl.java new file mode 100644 index 000000000..553a6a91e --- /dev/null +++ b/src/net/i2p/itoopie/i2pcontrol/methods/I2PControl.java @@ -0,0 +1,38 @@ +package net.i2p.itoopie.i2pcontrol.methods; + +import java.util.HashMap; + + +/** + * Describes the ways a I2P router can be restarted. + * @author hottuna + */ +public class I2PControl{ + private final static HashMap enumMap; + + + /** + * Describes the ways a I2P router can be restarted. + * @author hottuna + */ + public enum I2P_CONTROL implements Remote{ + PASSWORD { public boolean isReadable(){ return false;} + public boolean isWritable(){ return true;} + public String toString() { return "i2pcontrol.password"; }}, + + PORT { public boolean isReadable(){ return false;} + public boolean isWritable(){ return true;} + public String toString() { return "i2pcontrol.port"; }} + }; + + static { + enumMap = new HashMap(); + for (I2P_CONTROL n : I2P_CONTROL.values()){ + enumMap.put(n.toString(), n); + } + } + + public static I2P_CONTROL getEnum(String key){ + return enumMap.get(key); + } +}