From 71fad77a3a79018c77b8cf052dfcc9590709e90c Mon Sep 17 00:00:00 2001
From: zzz {% trans configspec=site_url('docs/spec/configuration') -%}
+Clients may be started directly by the router when they are listed
+in the clients.config file.
+These clients may be "managed" or "unmanaged".
+This is handled by the ClientAppManager.
+Additionally, managed or unmanaged clients may register with the
+ClientAppManager so that other clients may retrieve a reference to them.
+There is also a simple Port Mapper facility for clients to register an
+internal port that other clients may look up.
+{%- endtrans %} {% trans -%}
+As of release 0.9.4, the router supports managed clients.
+Managed clients are instantiated and started by the ClientAppManager.
+The ClientAppManager maintains a reference to the client and receives updates on the client's state.
+Managed clients are preferred, as it is much easier to implement state tracking
+and to start and stop a client. It also is much easier to avoid static references in the client code
+which could lead to excessive memory usage after a client is stopped.
+Managed clients may be started and stopped by the user in the router console,
+and are stopped at router shutdown.
+{%- endtrans %} {% trans -%}
+Managed clients implement either the net.i2p.app.ClientApp or net.i2p.router.app.RouterApp interface.
+Clients implementing the ClientApp interface must provide the following constructor:
+{%- endtrans %} {% trans -%}
+Clients implementing the RouterApp interface must provide the following constructor:
+{%- endtrans %} {% trans -%}
+The arguments provided are specified in the clients.config file.
+{%- endtrans %} {% trans -%}
+If the main class specified in the clients.config file does not implement a managed interface,
+it will be started with main() with the arguments specified,
+and stopped with main() with the arguments specified.
+The router does not maintain a reference, since all interactions are via the static main() method.
+The console cannot provide accurate state information to the user.
+{%- endtrans %} {% trans -%}
+Clients, whether managed or unmanaged, may register with the ClientAppManager
+so that other clients may retrieve a reference to them.
+Registration is by name.
+Known registered clients are:
+{%- endtrans %} {% trans -%}
+The router also provides a simple mechanism for clients to find an internal socket service,
+such as the HTTP proxy. This is provided by the Port Mapper.
+Registration is by name.
+Clients that register generally provide an internal emulated socket on that port.
+{%- endtrans %}{% trans %}Overview{% endtrans %}
+{% trans %}Managed Clients{% endtrans %}
+
+ public MyClientApp(I2PAppContext context, ClientAppManager listener, String[] args)
+
+
+ public MyClientApp(RouterContext context, ClientAppManager listener, String[] args)
+
+{% trans %}Unmanaged Clients{% endtrans %}
+{% trans %}Registered Clients{% endtrans %}
+
+ console, i2ptunnel, Jetty, outproxy, update
+
+
+{% trans %}Port Mapper{% endtrans %}
+
-As of release 0.9.4, the router supports "managed" clients.
-Managed clients are instantiated and started by the ClientAppManager
.
-The ClientAppManager maintains a reference to the client and receives updates on the client's state.
-Managed clients are preferred, as it is much easier to implement state tracking
-and to start and stop a client. It also is much easier to avoid static references in the client code
-which could lead to excessive memory usage after a client is stopped.
-
-Managed clients implement either the net.i2p.app.ClientApp
or
-net.i2p.router.app.RouterApp
interface.
-Clients implementing the ClientApp interface MUST provide the following constructor:
-
- public MyClientApp(I2PAppContext context, ClientAppManager listener, String[] args) --Clients implementing the RouterApp interface MUST provide the following constructor: -
- public MyClientApp(RouterContext context, ClientAppManager listener, String[] args) --The args will be the arguments specified in the clients.config file. - - -
-If the main class does not implement a managed interface, -it will be started with main() with the arguments specified, -and stopped with main() with the arguments specified. -
{% trans -%}