buffer.append( "\t" + application.getState() );
buffer.append( "\t" + application.getProcessState() );
    private void processInfoCommand( CommandLine line ) throws Exception    {        Manager manager = null;        try        {            manager = getManager( line );        }        catch( Exception e )        {            // ignore        }        ApplicationRegistry registry = getApplicationRegistry( line );        String key = (String) line.getValue( INFO_COMMAND, null );                if( null == key )        {            StringBuffer buffer = new StringBuffer( "\n" );            try            {                String[] keys = registry.getKeys();                buffer.append( "\nProfile count: " + keys.length + "\n" );                for( int i=0; i<keys.length; i++ )                {                    String k = keys[i];                    ApplicationDescriptor profile =                       registry.getApplicationDescriptor( k );                    buffer.append(                       "\n ("                       + ( i+1 )                       + ") "                       + k                    );                    if( null != manager )                    {                        Application application = manager.getApplication( k );                        buffer.append( "\t" + application.getState() );                    }                    else                    {                        buffer.append( "\t" );                    }                    buffer.append( "\t" + profile.getCodeBaseURI() );                }                buffer.append( "\n" );                System.out.println( buffer.toString() );            }            catch( RemoteException e )            {                getLogger().error( "Remote exception.", e );            }            catch( UnknownKeyException e )            {                // ignore            }        }        else        {            try            {                ApplicationDescriptor profile = registry.getApplicationDescriptor( key );                listProfile( profile );                if( null != manager )                {                    Application application = manager.getApplication( key );                    System.out.println( "\n  Process State: " + application.getState() );                    Instance instance = application.getInstance();                    if( null != instance )                    {                        System.out.println( "\n  Application State: " + instance.getState() );                    }                }            }            catch( UnknownKeyException e )            {                getLogger().warn( "Unknown application key [" + key + "]." );            }            catch( RemoteException e )            {                getLogger().error( "Remote exception.", e );            }        }    }