Package net.i2p.router.startup
Class LoadClientAppsJob
- java.lang.Object
-
- net.i2p.router.JobImpl
-
- net.i2p.router.startup.LoadClientAppsJob
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LoadClientAppsJob.DelayedRunClient
Public for router console only, not for use by others, subject to change
-
Constructor Summary
Constructors Constructor Description LoadClientAppsJob(RouterContext ctx)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Descriptive name of the taskstatic String[]
parseArgs(String args)
Parse arg string into an array of args.static void
runClient(String className, String clientName, String[] args, RouterContext ctx, Log log)
Run client in a new thread.static void
runClient(String className, String clientName, String[] args, RouterContext ctx, Log log, ThreadGroup threadGroup, ClassLoader cl)
Run client in a new thread.static void
runClientInline(String className, String clientName, String[] args, Log log)
Run client in this thread.static void
runClientInline(String className, String clientName, String[] args, Log log, ClassLoader cl)
Run client in this thread.void
runJob()
Actually perform the task.static void
testClient(String className, ClassLoader cl)
Use to test if the class is present, to propagate an error back to the user, since runClient() runs in a separate thread.-
Methods inherited from class net.i2p.router.JobImpl
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toString
-
-
-
-
Constructor Detail
-
LoadClientAppsJob
public LoadClientAppsJob(RouterContext ctx)
-
-
Method Detail
-
runJob
public void runJob()
Description copied from interface:Job
Actually perform the task. This call blocks until the Job is complete.
-
parseArgs
public static String[] parseArgs(String args)
Parse arg string into an array of args. Spaces or tabs separate args. Args may be single- or double-quoted if they contain spaces or tabs. There is no provision for escaping quotes. A quoted string may not contain a quote of any kind.- Parameters:
args
- may be null- Returns:
- non-null, 0-length if args is null
-
testClient
public static void testClient(String className, ClassLoader cl) throws ClassNotFoundException
Use to test if the class is present, to propagate an error back to the user, since runClient() runs in a separate thread.- Parameters:
cl
- can be null- Throws:
ClassNotFoundException
- Since:
- 0.7.13
-
runClientInline
public static void runClientInline(String className, String clientName, String[] args, Log log) throws Exception
Run client in this thread. Used for plugin sub-clients only. Does not register with the ClientAppManager.- Parameters:
clientName
- can be nullargs
- can be null- Throws:
Exception
- just about anything, caller would be wise to catch Throwable- Since:
- 0.7.13
-
runClientInline
public static void runClientInline(String className, String clientName, String[] args, Log log, ClassLoader cl) throws Exception
Run client in this thread. Used for plugin sub-clients only. Does not register with the ClientAppManager.- Parameters:
clientName
- can be nullargs
- can be nullcl
- can be null- Throws:
Exception
- just about anything, caller would be wise to catch Throwable- Since:
- 0.7.14
-
runClient
public static void runClient(String className, String clientName, String[] args, RouterContext ctx, Log log)
Run client in a new thread.- Parameters:
clientName
- can be nullargs
- can be null
-
runClient
public static void runClient(String className, String clientName, String[] args, RouterContext ctx, Log log, ThreadGroup threadGroup, ClassLoader cl)
Run client in a new thread.- Parameters:
clientName
- can be nullargs
- can be nullthreadGroup
- can be nullcl
- can be null- Since:
- 0.7.13
-
-