String command, String path, String[] args, boolean waitFor, boolean tools )
String command, String path, String[] args, boolean waitFor )
    private boolean deployHandler(       String command, String path, String[] args, boolean waitFor, boolean tools )    {        Logger logger = getLogger().getChildLogger( command );        if( m_debug )        {            Enumeration names = System.getProperties().propertyNames();            StringBuffer buffer = new StringBuffer( "System property listing:" );            while( names.hasMoreElements() )            {                String name = (String) names.nextElement();                buffer.append( name + "=" + System.getProperty( name ) );            }        }        try        {            TransitModel model = getTransitModel( args );            URI uri = new URI( path );            Transit transit = Transit.getInstance( model );            setupMonitors( transit, (Adapter) getLogger() );            Repository repository = transit.getRepository();            m_plugin =               repository.getPlugin(                 ClassLoader.getSystemClassLoader(),                 uri, new Object[]{model, args, logger} );        }        catch( RepositoryException e )        {            Throwable cause = e.getCause();            if( ( null != cause ) && ( cause instanceof GeneralException ) )            {                getLogger().error( cause.getMessage() );                System.exit( 1 );            }            else            {                getLogger().error( e.getMessage(), e.getCause() );                System.exit( 1 );            }        }        catch( GeneralException e )        {            getLogger().error( e.getMessage() );            System.exit( 1 );        }        catch( Throwable e )        {            final String error =               "Unable to deploy the ["               + command               + "] handler due to deployment failure.";            getLogger().error( error, e );            System.exit( 1 );        }                if( m_plugin instanceof Runnable )        {            getLogger().debug( "starting " + m_plugin.getClass().getName() );            Thread thread = new Thread( (Runnable) m_plugin );            thread.start();            setShutdownHook( thread );            return true;        }        else        {            getLogger().debug( "deployed " + m_plugin.getClass().getName() );            return waitFor;        }    }