java.lang.Object
net.i2p.router.update.DummyHandler
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classUse for both check and update.Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RouterContextThe router the dummy update runs on.private final ConsoleUpdateManagerReports the dummy update's progress.Constructor Summary
ConstructorsConstructorDescriptionDummyHandler(RouterContext ctx, ConsoleUpdateManager mgr) Creates a handler that serves dummy update checks only.Method Summary
All MethodsModifier and TypeMethodDescriptioncheck(UpdateType type, UpdateMethod method, String id, String currentVersion, long maxTime) Spins off an UpdateTask that sleeps.update(UpdateType type, UpdateMethod method, List<URI> updateSources, String id, String newVersion, long maxTime) Spins off an UpdateTask that sleeps.
Field Details
_context
The router the dummy update runs on._mgr
Reports the dummy update's progress.
Constructor Details
DummyHandler
Creates a handler that serves dummy update checks only.- Parameters:
ctx- router context handed to the runner as the runner's ownermgr- update manager notified when the dummy run finishes or fails
Method Details
check
public UpdateTask check(UpdateType type, UpdateMethod method, String id, String currentVersion, long maxTime) Spins off an UpdateTask that sleeps.- Specified by:
checkin interfaceChecker- Parameters:
type- the kind of update to look for, e.g.UpdateType.ROUTER_SIGNEDmethod- the transport to fetch it over, e.g.UpdateMethod.HTTPid- plugin name or ignoredcurrentVersion- the running version, compared against the remote one so an equal or older release is not offeredmaxTime- how long you have- Returns:
- active task or null if unable to check
update
public UpdateTask update(UpdateType type, UpdateMethod method, List<URI> updateSources, String id, String newVersion, long maxTime) Spins off an UpdateTask that sleeps.- Specified by:
updatein interfaceUpdater- Parameters:
type- selects what is being fetched, e.g.UpdateType.ROUTER_SIGNEDmethod- how it is fetched, e.g.UpdateMethod.HTTPover I2PupdateSources- Where to get the new version fromid- plugin name or ignorednewVersion- new version to downloadmaxTime- how long you have- Returns:
- active task or null if unable to download