Commit Graph

57 Commits

Author SHA1 Message Date
zzz
ef3a12f01a * UpdateManager:
- Convert to RouterApp and remove update hooks from context
     (ticket #1185)
2014-02-07 15:40:23 +00:00
c6f2d4948b Class generics 2013-11-24 23:41:06 +00:00
2f4765665d routerconsole: type arguments, unused imports 2013-11-21 11:31:50 +00:00
zzz
1d4190734d Findbugs all over
- volatile -> atomic
 - unused code and fields
 - closing streams
 - hashCode / equals
 - known non-null
 - Number.valueOf
 - new String
 Still avoiding SAM, BOB, SusiMail
2013-11-16 13:22:05 +00:00
zzz
de4b0198b7 javadoc fixes 2013-06-30 17:13:53 +00:00
zzz
e394d3d4c5 * DatabaseLookupmessage:
- Add support for requesting an encrypted reply
* NetDB:
  - Add support for encrypted DatabaseSearchReplyMessage and DatabaseStoreMessage
    in response to a DatabaseLookupMessage
* PRNG: Cleanups using Collections.singletonMap()
* Router utils: New RemovableSingletonSet
* TransientSessionKeyManager:
  - Support variable expiration for inbound tag sets
  - Several efficiency improvements
* VersionComparator: Add static method, use most places
2013-05-26 17:25:02 +00:00
zzz
0816cfe273 * Plugins: Track pending plugin clients better, don't hold references,
start delayed clients from SimpleTimer2 instead of Job queue (ticket #670)
2013-04-26 16:41:09 +00:00
zzz
1e5ffe636f * Updates:
- Notify manager about all available update methods at once, so the priority
     system works and it doesn't only update via HTTP
   - Start router update download at startup if available
   - Only check plugins when core version increases, not decreases, so we
     don't update plugins when downgrading
   - Limit length of URL shown on summary bar
2013-04-19 11:49:22 +00:00
zzz
f1dd77982a RouterConsole compile fixes for Jetty 7.
Convert LocaleWebAppHandler from extending WebAppContext to
extending HandlerWrapper, since handle() is now final in WebAppContext.
Untested.
2012-11-21 20:49:18 +00:00
zzz
5e48331eae propagate from branch 'i2p.i2p.zzz.update' (head 267311f29e501fcc8b3d674a93e78b5520ac985e)
to branch 'i2p.i2p' (head edeca2ab47e734c2314ff394609292d8bd3d5293)
2012-10-28 12:48:35 +00:00
zzz
724f4f9b37 - Several plugin install fixes
- Remove unused UpdateTypes
- Only try applicable updaters when updating
- Javadoc fixes
2012-10-23 02:34:24 +00:00
zzz
4db4010abf propagate from branch 'i2p.i2p' (head 2da3b585b42d058e25909bc303d72277ae2463b5)
to branch 'i2p.i2p.zzz.update' (head ebbad994215dc2822e9a1776399864ed77a0e5a0)
2012-10-14 22:42:00 +00:00
zzz
8f17b73091 changes due to LoadClientAppsJob changes for ClientApp interface 2012-10-13 12:51:24 +00:00
zzz
fb5d0cd760 Boolean.valueOf(x).booleanValue() -> Boolean.parseBoolean(x) 2012-09-28 17:50:41 +00:00
zzz
e62b76d2cc Big refactor of the router console update subsystem, in preparation for
implementing out-of-console updaters like i2psnark.

- Add new update interfaces in net.i2p.update
- All update implementations moved to routerconsole update/
- Implement an UpdateManager that registers with the RouterContext
- UpdateManager handles multiple types of things to update
  (router, plugins, news, ...) and methods of updating (HTTP, ...)
- UpdateManager maintains list of installed, downloaded, and available versions of everything
- Define Updaters that can check for a new version and/or download an item
- Individual Updaters register with the UpdateManager obtained from
  I2PAppContext, identifying the type of update item and
  update method they can handle.
- Updaters need only core libs, no router.jar or routerconsole access required.
- All checks and updates are initiated via the UpdateManager.
- All status on checks and updates in-progress or completed are
  obtained from the UpdateManager. No more use of System properties
  to broadcast update state.
- All update and checker tasks are intantiated on demand and threaded;
  no more static references left over.
- Split out the Runners and Checkers from the Handlers and make the inheritance more sane.
- No more permanent NewsFetcher thread; run on the SimpleScheduler queue
  and thread a checker task only to fetch the news.
- No more static NewsFetcher instance in routerconsole.
  All helper methods that are still required are moved to NewsHelper.

The UpdateManager implements the policy for when to check and download.
All requests go through the UpdateManager.

For each update type, there's several parts:
    - The xxxUpdateHandler implements the Updater
    - The xxxUpdateChecker implements the UpdateTask for checking
    - The xxxUpdateRunner implements the UpdateTask for downloading

New and moved classes:

web/				update/
----				-------
new				ConsoleUpdateManager.java

new				PluginUpdateChecker.java from PluginUpdateChecker
PluginUpdateChecker 		-> PluginUpdateHandler.java
PluginUpdateHandler.java	-> PluginUpdateRunner

new				UnsignedUpdateHandler.java
UnsignedUpdateHandler		->  UnsignedUpdateRunner.java
new				UnsignedUpdateChecker from NewsFetcher

UpdateHandler.java remains
new				UpdateHandler.java
new				UpdateRunner.java from UpdateHandler

move				NewsHandler from NewsFetcher
new				NewsFetcher
new				NewsTimerTask

new				DummyHandler


Initial checkin. Unfinished, untested, unpolished.
2012-06-18 22:09:45 +00:00
4ffbfce51e Plugins: Order and reverse order plugin names for start/stop all cases. 2012-03-19 12:37:39 +00:00
1f407bc34f Plugins 2012-03-15 00:39:11 +00:00
0fabbc9039 Plugins: bugfix and defer update. 2012-03-13 09:49:15 +00:00
zzz
6107e38e56 propagate from branch 'i2p.i2p' (head 0f4af64e64536c467b623286bce659dd2dfe9342)
to branch 'i2p.i2p.zzz.jetty6' (head d525108d8e9ecb842a99bb81c1138c43b5e39653)
2012-02-04 15:42:23 +00:00
zzz
0aa9e39ee3 * Plugins: Add completion message after all-update check 2012-01-23 17:53:59 +00:00
zzz
ba01451038 propagate from branch 'i2p.i2p' (head 7e9829897ed454bcb4a8e64b029060f7e90cbbfa)
to branch 'i2p.i2p.zzz.jetty6' (head b9984717e63b03b3b5fcf3a9729d55411aa65e89)
2012-01-18 19:16:53 +00:00
zzz
95329803a9 - Use new synchronized change-and-save-config methods
to eliminate races with ReadConfigJob
2012-01-18 01:54:34 +00:00
zzz
6198739f7a propagate from branch 'i2p.i2p' (head 899a1923586f3d7d622bd02e03c87717566617c4)
to branch 'i2p.i2p.zzz.jetty6' (head cb3e33be282b6002f6790609f4a3eef7f42069d3)
2012-01-16 14:10:32 +00:00
zzz
fc6f4ecc74 * Plugins:
- Auto-update plugins after a router update
    - Add update-all button
2012-01-15 21:15:08 +00:00
zzz
3d2d60469e * Plugins:
- Only stop a plugin before update if it was running
    - Don't start a plugin after update if it was disabled
    - Disable plugin if it fails version checks at startup
2012-01-15 16:59:33 +00:00
zzz
69bbb88407 propagate from branch 'i2p.i2p' (head b7ee04ecc7a594239e977b25a52ebdabadce558e)
to branch 'i2p.i2p.zzz.jetty6' (head 2cd4a4dae8b87b9ed2128d83aff1b39e3a818556)
2012-01-08 14:55:10 +00:00
zzz
bb7a88ffc9 * Plugins:
- Enforce min and max Jetty versions at plugin installation
    - Enforce I2P, Java, and Jetty versions at plugin startup too
2011-12-24 00:48:30 +00:00
zzz
92b9d0a996 First cut at migrating to Jetty 6 and prep for using an external
Jetty 6 package.

- Add several jars from the Jetty 6 distribution
- Update jetty.xml
- Add context XML files
- Update WorkingDir to migrate the content XML files
- Update RouterConsoleRunner and LocaleWebAppHandler
- Remove all old Jetty 5.1.15 local mods;
  this will break Seedless using a custom Server() constructor
- Update I2PRequestLog to be a mod of NCSARequestLog from 6.1.26
- Put I2PRequestLog in its own jar
- Copy MultiPartRequest and other required classes from Jetty 5.1.15
  and add it to susimail, as the replacement MultiPartFilter in
  Jetty 6 is difficult to migrate to, and does not support content-type
- Update i2psnark for Jetty 6
- Disable i2psnark RunStandalone, unused and instantiated Jetty 5
- Fix up all webapp build.xml to reference new jars

Not yet working: Plugin/webapp run detection and stopping, eepsite CGI
Not well tested: Plugins, classpaths, webapps
2011-12-23 00:56:48 +00:00
zzz
428db02274 * Console: Hide iframe on mobile browsers
* DataHelper: Speed up eq() (Ticket #437)
    * HTTPServer: Strip inbound X-Accept-Encoding header
    * netdb.jsp: HTML fixes
    * Plugins: Log error when console server not found
    * Reseed: Log tweak
2011-04-10 18:22:43 +00:00
8c5fd29233 Plugin: ticket 336 fix NPE 2010-11-27 13:52:57 +00:00
8b5c0a2db1 Plugin: ticket 104 Fix webapp isRunning to check ALL webapps.
The only defecency is that if one is running, that it considers the
      entire pliugin to be running. I'm not sure if that is a good thing
      or a bad thing, but the other code checks threads that way.
2010-11-24 14:31:54 +00:00
zzz
a1524241cb Set permissions on directories and files when they are created 2010-07-06 15:22:48 +00:00
9da95b8165 PluginStarter: If there is some delay, there may be a really good reason for it.
Loading a class would be one of them!
    So we do a quick check first, If it bombs out, we delay and try again.
    If it bombs after that, then we throw the ClassNotFoundException.
2010-05-10 07:27:34 +00:00
zzz
a8db6b007f * Plugins:
- Set classpath for specific client only, not for the whole JVM
      - Use ConfigDir() not AppDir()
2010-05-05 19:34:03 +00:00
zzz
9683a110d6 plugin cleanups 2010-04-23 16:28:14 +00:00
ecbc0a2a2d Show the start button when a plugin is not running, and the stop button when a plugin is running. 2010-04-16 03:58:48 +00:00
zzz
a0d6741ff5 fix wrong prefix for startOnLoad in plugin webapps.config 2010-04-12 21:11:22 +00:00
zzz
24020302fd cleanup 2010-04-10 15:29:16 +00:00
zzz
caab860351 - Add tooltip support for plugin links
- Make target=_blank for plugin links
2010-04-05 13:22:16 +00:00
zzz
c43b16cfbb * configclients.jsp:
- Always show start button for webapps and plugins
    * configclients.jsp, configupdate.jsp:
      - Fix submission when entering CR in a text box
    * Plugins:
      - Stop all plugins at shutdown
      - Log tweaks
    * WebApps:
      - Remove the WAC after stopping it
      - Stop a WAC before starting it to prevent dups
2010-03-29 21:20:48 +00:00
zzz
16a14d4ebd * Clients:
- Negative delay means run immediately and inline
      - Add methods to test class and run inline,
        to propagate errors to the console
      - Add javadoc for clients.config format
      - Use new methods for plugins
2010-03-15 16:19:19 +00:00
zzz
b4911a2b2f support plugin themes 2010-02-26 16:58:01 +00:00
zzz
eae18e61b7 unhide plugins, fix d/l status display 2010-02-19 14:42:43 +00:00
zzz
82444f9e7b move getConsoleServer() method 2010-02-18 16:33:47 +00:00
zzz
7701693d37 * Plugins:
- Fix plugin start button
      - Change signer prop to match docs
      - Tweaks
2010-02-17 18:12:46 +00:00
zzz
f265db4037 fix stop button; catch and log exceptions better 2010-02-11 21:41:54 +00:00
zzz
62308f26bc * Plugins:
- Fix classpath setting for webapps
      - Implement uninstall args in clients.config
2010-02-11 19:18:26 +00:00
zzz
949aea951e * Plugins:
- Hook up update/delete/check/save buttons
      - Implement delete
      - Hide unless router.enablePlugins=true
2010-02-10 19:09:35 +00:00
zzz
cfc49ab261 * Plugins:
- Check plugin key against all installed plugins
      - Reword some error messages
    * VersionComparator: add '-' and '_' as valid separators
      to better support plugin and java version checking
2010-02-10 15:35:00 +00:00
zzz
a820c01ba5 strip HTML from fields 2010-02-08 23:28:09 +00:00