修飾子とタイプ | クラス | 説明 |
---|---|---|
(package private) static class |
TunnelControllerGroup.CustomThreadPoolExecutor |
Not really needed for now but in case we want to add some hooks like afterExecute().
|
修飾子とタイプ | フィールド | 説明 |
---|---|---|
(package private) static java.lang.String |
DEFAULT_CONFIG_FILE |
コンストラクタ | 説明 |
---|---|
TunnelControllerGroup(I2PAppContext context,
ClientAppManager mgr,
java.lang.String[] args) |
Instantiation only.
|
修飾子とタイプ | メソッド | 説明 |
---|---|---|
(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)
|
java.util.List<java.lang.String> |
clearAllMessages() |
Fetch and clear all outstanding messages from any of the known tunnels.
|
(package private) java.util.concurrent.ThreadPoolExecutor |
getClientExecutor() |
|
java.util.List<TunnelController> |
getControllers() |
Retrieve a list of tunnels known.
|
java.lang.String |
getDisplayName() |
ClientApp interface
|
static TunnelControllerGroup |
getInstance() |
In I2PAppContext will instantiate if necessary and always return non-null.
|
java.lang.String |
getName() |
ClientApp interface
|
ClientAppState |
getState() |
ClientApp interface
|
void |
loadControllers(java.lang.String configFile) |
Load up all of the tunnels configured in the given file.
|
static void |
main(java.lang.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.
|
java.util.List<java.lang.String> |
removeController(TunnelController controller) |
Stop and remove the given tunnel.
|
java.util.List<java.lang.String> |
restartAllControllers() |
Restart all tunnels.
|
void |
saveConfig() |
Save the configuration of all known tunnels to the default config
file
|
void |
saveConfig(java.lang.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(java.lang.String[] args) |
ClientApp interface
|
java.util.List<java.lang.String> |
startAllControllers() |
Start all tunnels.
|
void |
startup() |
ClientApp interface
|
java.util.List<java.lang.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)
|
static final java.lang.String DEFAULT_CONFIG_FILE
public TunnelControllerGroup(I2PAppContext context, ClientAppManager mgr, java.lang.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.configjava.lang.IllegalArgumentException
- if too many argspublic static TunnelControllerGroup getInstance()
java.lang.IllegalArgumentException
- if unable to load from i2ptunnel.configpublic static void main(java.lang.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.configjava.lang.IllegalArgumentException
- if unable to load from config from filepublic void startup()
public ClientAppState getState()
public java.lang.String getName()
public java.lang.String getDisplayName()
getDisplayName
インタフェース内 ClientApp
public void shutdown(java.lang.String[] args)
public void shutdown()
public void loadControllers(java.lang.String configFile)
java.lang.IllegalArgumentException
- if unable to load from filepublic void reloadControllers()
java.lang.IllegalArgumentException
- if unable to reload config filepublic void unloadControllers()
public void addController(TunnelController controller)
public java.util.List<java.lang.String> removeController(TunnelController controller)
public java.util.List<java.lang.String> stopAllControllers()
public java.util.List<java.lang.String> startAllControllers()
public java.util.List<java.lang.String> restartAllControllers()
public java.util.List<java.lang.String> clearAllMessages()
public void saveConfig() throws java.io.IOException
java.io.IOException
public void saveConfig(java.lang.String configFile) throws java.io.IOException
java.io.IOException
public java.util.List<TunnelController> getControllers()
java.lang.IllegalArgumentException
- if unable to load config from filevoid acquire(TunnelController controller, I2PSession session)
void release(TunnelController controller, I2PSession session)
java.util.concurrent.ThreadPoolExecutor getClientExecutor()