Added missing class. D'oh!!!
This commit is contained in:
38
src/net/i2p/itoopie/i2pcontrol/methods/I2PControl.java
Normal file
38
src/net/i2p/itoopie/i2pcontrol/methods/I2PControl.java
Normal file
@ -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<String,I2P_CONTROL> 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<String,I2P_CONTROL>();
|
||||
for (I2P_CONTROL n : I2P_CONTROL.values()){
|
||||
enumMap.put(n.toString(), n);
|
||||
}
|
||||
}
|
||||
|
||||
public static I2P_CONTROL getEnum(String key){
|
||||
return enumMap.get(key);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user