net.i2p.router.startup
Class LoadClientAppsJob

java.lang.Object
  extended by net.i2p.router.JobImpl
      extended by net.i2p.router.startup.LoadClientAppsJob
All Implemented Interfaces:
Job

public class LoadClientAppsJob
extends JobImpl

Run any client applications specified in clients.config. If any clientApp contains the config property ".onBoot=true" it'll be launched immediately, otherwise it'll get queued up for starting 2 minutes later.


Nested Class Summary
static class LoadClientAppsJob.DelayedRunClient
           
 
Constructor Summary
LoadClientAppsJob(RouterContext ctx)
           
 
Method Summary
 java.lang.String getName()
          Descriptive name of the task
static void main(java.lang.String[] args)
           
static java.lang.String[] parseArgs(java.lang.String args)
           
static void runClient(java.lang.String className, java.lang.String clientName, java.lang.String[] args, Log log)
          Run client in a new thread.
static void runClient(java.lang.String className, java.lang.String clientName, java.lang.String[] args, Log log, java.lang.ThreadGroup threadGroup, java.lang.ClassLoader cl)
          Run client in a new thread.
static void runClientInline(java.lang.String className, java.lang.String clientName, java.lang.String[] args, Log log)
          Run client in this thread.
static void runClientInline(java.lang.String className, java.lang.String clientName, java.lang.String[] args, Log log, java.lang.ClassLoader cl)
          Run client in this thread.
 void runJob()
          Actually perform the task.
static void testClient(java.lang.String className, java.lang.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 java.lang.String[] parseArgs(java.lang.String args)

testClient

public static void testClient(java.lang.String className,
                              java.lang.ClassLoader cl)
                       throws java.lang.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:
java.lang.ClassNotFoundException
Since:
0.7.13

runClientInline

public static void runClientInline(java.lang.String className,
                                   java.lang.String clientName,
                                   java.lang.String[] args,
                                   Log log)
                            throws java.lang.Exception
Run client in this thread.

Parameters:
clientName - can be null
args - can be null
Throws:
just - about anything, caller would be wise to catch Throwable
java.lang.Exception
Since:
0.7.13

runClientInline

public static void runClientInline(java.lang.String className,
                                   java.lang.String clientName,
                                   java.lang.String[] args,
                                   Log log,
                                   java.lang.ClassLoader cl)
                            throws java.lang.Exception
Run client in this thread.

Parameters:
clientName - can be null
args - can be null
cl - can be null
Throws:
just - about anything, caller would be wise to catch Throwable
java.lang.Exception
Since:
0.7.14

runClient

public static void runClient(java.lang.String className,
                             java.lang.String clientName,
                             java.lang.String[] args,
                             Log log)
Run client in a new thread.

Parameters:
clientName - can be null
args - can be null

runClient

public static void runClient(java.lang.String className,
                             java.lang.String clientName,
                             java.lang.String[] args,
                             Log log,
                             java.lang.ThreadGroup threadGroup,
                             java.lang.ClassLoader cl)
Run client in a new thread.

Parameters:
clientName - can be null
args - can be null
threadGroup - can be null
cl - can be null
Since:
0.7.13

getName

public java.lang.String getName()
Description copied from interface: Job
Descriptive name of the task


main

public static void main(java.lang.String[] args)