java.lang.Object
net.i2p.router.startup.LoadClientAppsJob.RunApp
- All Implemented Interfaces:
Runnable
- Enclosing class:
LoadClientAppsJob
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringName of the app for the logs.private final String[]Arguments passed to the app.private final ClassLoaderClass loader for the app's classes.private final StringClass name of the app to run.private final RouterContextThe router context.private final LogLogger for the app loading.Constructor Summary
ConstructorsConstructorDescriptionRunApp(String className, String appName, String[] args, RouterContext ctx, Log log, ClassLoader cl) Creates the runnable that loads and starts one client application class.Method Summary
Modifier and TypeMethodDescriptionprivate static booleanisClientApp(Class<?> cls) Checks whether the class is a client app.private static booleanisInterface(Class<?> cls, Class<?> intfc) Checks whether the class implements an interface.private static booleanisRouterApp(Class<?> cls) Checks whether the class is a router app.voidrun()Load and start the client application.
Field Details
_className
Class name of the app to run._appName
Name of the app for the logs._args
Arguments passed to the app._ctx
The router context._log
Logger for the app loading._cl
Class loader for the app's classes.
Constructor Details
RunApp
public RunApp(String className, String appName, String[] args, RouterContext ctx, Log log, ClassLoader cl) Creates the runnable that loads and starts one client application class.- Parameters:
className- the class name of the app to runappName- the name of the app for the logsargs- the arguments passed to the appctx- the router contextlog- the logger for the app loadingcl- the class loader for the app's classes, null for the default
Method Details
run
isRouterApp
Checks whether the class is a router app.- Parameters:
cls- the class to check- Returns:
- true if it is a router app
isClientApp
Checks whether the class is a client app.- Parameters:
cls- the class to check- Returns:
- true if it is a client app
isInterface