|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.i2p.i2ptunnel.TunnelControllerGroup
public class TunnelControllerGroup
Coordinate a set of tunnels within the JVM, loading and storing their config to disk, and building new ones as requested. This is the entry point from clients.config.
| Field Summary | |
|---|---|
(package private) static String |
DEFAULT_CONFIG_FILE
|
| Constructor Summary | |
|---|---|
TunnelControllerGroup(I2PAppContext context,
ClientAppManager mgr,
String[] args)
Instantiation only. |
|
| Method Summary | |
|---|---|
(package private) void |
acquire(TunnelController controller,
I2PSession session)
Note the fact that the controller is using the session so that it isn't destroyed prematurely. |
void |
addController(TunnelController controller)
Add the given tunnel to the set of known controllers (but dont add it to a config file or start it or anything) |
List<String> |
clearAllMessages()
Fetch all outstanding messages from any of the known tunnels |
List<TunnelController> |
getControllers()
Retrieve a list of tunnels known |
String |
getDisplayName()
ClientApp interface |
static TunnelControllerGroup |
getInstance()
In I2PAppContext will instantiate if necessary and always return non-null. |
String |
getName()
ClientApp interface |
ClientAppState |
getState()
ClientApp interface |
void |
loadControllers(String configFile)
Load up all of the tunnels configured in the given file (but do not start them) DEPRECATED for use outside this class. |
static void |
main(String[] args)
|
(package private) void |
release(TunnelController controller,
I2PSession session)
Note the fact that the controller is no longer using the session, and if no other controllers are using it, destroy the session. |
void |
reloadControllers()
Stop all tunnels, reload config, and restart those configured to do so. |
List<String> |
removeController(TunnelController controller)
Stop and remove the given tunnel |
List<String> |
restartAllControllers()
Restart all tunnels |
void |
saveConfig()
Save the configuration of all known tunnels to the default config file |
void |
saveConfig(String configFile)
Save the configuration of all known tunnels to the given file |
void |
shutdown()
Warning - destroys the singleton! Caller must root a new context before calling instance() or main() again. |
void |
shutdown(String[] args)
ClientApp interface |
List<String> |
startAllControllers()
Start all tunnels |
void |
startup()
ClientApp interface |
List<String> |
stopAllControllers()
Stop all tunnels |
void |
unloadControllers()
Stop and remove reference to all known tunnels (but dont delete any config file or do other silly things) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final String DEFAULT_CONFIG_FILE
| Constructor Detail |
|---|
public TunnelControllerGroup(I2PAppContext context,
ClientAppManager mgr,
String[] args)
mgr - may be nullargs - one arg, the config file, if not absolute will be relative to the context's config dir,
if empty or null, the default is i2ptunnel.config| Method Detail |
|---|
public static TunnelControllerGroup getInstance()
IllegalArgumentException - if unable to load from i2ptunnel.configpublic static void main(String[] args)
args - one arg, the config file, if not absolute will be relative to the context's config dir,
if no args, the default is i2ptunnel.config
IllegalArgumentException - if unable to load from config from filepublic void startup()
startup in interface ClientAppIllegalArgumentException - if unable to load config from filepublic ClientAppState getState()
getState in interface ClientApppublic String getName()
getName in interface ClientApppublic String getDisplayName()
getDisplayName in interface ClientApppublic void shutdown(String[] args)
shutdown in interface ClientApppublic void shutdown()
public void loadControllers(String configFile)
IllegalArgumentException - if unable to load from filepublic void reloadControllers()
IllegalArgumentException - if unable to reload config filepublic void unloadControllers()
public void addController(TunnelController controller)
public List<String> removeController(TunnelController controller)
public List<String> stopAllControllers()
public List<String> startAllControllers()
public List<String> restartAllControllers()
public List<String> clearAllMessages()
public void saveConfig()
throws IOException
IOException
public void saveConfig(String configFile)
throws IOException
IOExceptionpublic List<TunnelController> getControllers()
void acquire(TunnelController controller,
I2PSession session)
void release(TunnelController controller,
I2PSession session)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||