mil.dod.th.ose.shell/src/mil/dod/th/ose/shell/ThoseCommands.java
@Descriptor("Displays factories registered with the Terra Harvest Core")
    public void factories(
            final CommandSession session,
            @Descriptor("Flag used to display asset factories")
            @Parameter(names = { "-a", "--asset" }, presentValue = "true", absentValue = "false")
            final boolean assets,
            @Descriptor("Flag used to display custom comms factories")
            @Parameter(names = { "-c", "--ccomm" }, presentValue = "true", absentValue = "false")
            final boolean ccomms
    )
    {
        final PrintStream out = session.getConsole();

        if (assets)
        {
            out.println("Asset Factories:");
            Utilities.printServiceImplementations(m_BundleContext, out, AssetFactory.class, false, false);
        }

        if (ccomms)
        {
            out.println("PhysicalLink Factories:");
            Utilities.printServiceImplementations(m_BundleContext, out, PhysicalLinkFactory.class, false, false);
            out.println();

            out.println("LinkLayer Factories:");
            Utilities.printServiceImplementations(m_BundleContext, out, LinkLayerFactory.class, false, false);
            out.println();

            out.println("TransportLayer Factories:");
            Utilities.printServiceImplementations(m_BundleContext, out, TransportLayerFactory.class, false, false);
        }

        // If no flags are provided, display all factories
        if (!(assets | ccomms))
        {
            out.println("Factories:");
            Utilities.printServiceImplementations(m_BundleContext, out, null, false, true);
        }
    }
/**
     * Factory information command.
     * 
     * @param session
     *            provides access to the Gogo shell session
     * @param assets
     *            whether to show asset factories
     * @param ccomms
     *            whether to show custom comms factories
     */
Factory information command.

@param session
provides access to the Gogo shell session
@param assets
whether to show asset factories
@param ccomms
whether to show custom comms factories
Factory information command . @param session provides access to the Gogo shell session @param assets whether to show asset factories @param ccomms whether to show custom comms factories
@Descriptor("Displays factories registered with the Terra Harvest Core")
    public void factories(
            final CommandSession session,
            @Descriptor("Flag used to display asset factories")
            @Parameter(names = { "-a", "--asset" }, presentValue = "true", absentValue = "false")
            final boolean assets,
            @Descriptor("Flag used to display custom comms factories")
            @Parameter(names = { "-c", "--ccomm" }, presentValue = "true", absentValue = "false")
            final boolean ccomms
    )
    {
        final PrintStream out = session.getConsole();
        if (assets)
        {
            out.println("Asset Factories:");
            Utilities.printServiceImplementations(m_BundleContext, out, AssetFactory.class, false, false);
        }
        if (ccomms)
        {
            out.println("PhysicalLink Factories:");
            Utilities.printServiceImplementations(m_BundleContext, out, PhysicalLinkFactory.class, false, false);
            out.println();
            out.println("LinkLayer Factories:");
            Utilities.printServiceImplementations(m_BundleContext, out, LinkLayerFactory.class, false, false);
            out.println();
            out.println("TransportLayer Factories:");
            Utilities.printServiceImplementations(m_BundleContext, out, TransportLayerFactory.class, false, false);
        }
        if (!(assets | ccomms))
        {
            out.println("Factories:");
            Utilities.printServiceImplementations(m_BundleContext, out, null, false, true);
        }
    }
@ Descriptor ( "Displays factories registered with the Terra Harvest Core" ) public void factories ( final CommandSession session , @ Descriptor ( "Flag used to display asset factories" ) @ Parameter ( names = { "-a" , "--asset" } , presentValue = "true" , absentValue = "false" ) final boolean assets , @ Descriptor ( "Flag used to display custom comms factories" ) @ Parameter ( names = { "-c" , "--ccomm" } , presentValue = "true" , absentValue = "false" ) final boolean ccomms ) { final PrintStream out = session . getConsole ( ) ; if ( assets ) { out . println ( "Asset Factories:" ) ; Utilities . printServiceImplementations ( m_BundleContext , out , AssetFactory . class , false , false ) ; } if ( ccomms ) { out . println ( "PhysicalLink Factories:" ) ; Utilities . printServiceImplementations ( m_BundleContext , out , PhysicalLinkFactory . class , false , false ) ; out . println ( ) ; out . println ( "LinkLayer Factories:" ) ; Utilities . printServiceImplementations ( m_BundleContext , out , LinkLayerFactory . class , false , false ) ; out . println ( ) ; out . println ( "TransportLayer Factories:" ) ; Utilities . printServiceImplementations ( m_BundleContext , out , TransportLayerFactory . class , false , false ) ; } if ( ! ( assets | ccomms ) ) { out . println ( "Factories:" ) ; Utilities . printServiceImplementations ( m_BundleContext , out , null , false , true ) ; } }
Factory information command.
Factory information command .
// If no flags are provided, display all factories