mil.dod.th.ose.config/src/mil/dod/th/ose/config/loading/impl/FactoryObjectLoaderImpl.java
private void createTracker(final FactoryObjectConfig config)
            throws IllegalArgumentException
    {
        final FactoryTypeEnum type = config.getFactoryType();
        final ServiceTrackerCustomizer<FactoryDescriptor, FactoryDescriptor> customizer;
        switch (type)
        {
            case ASSET:
                customizer = new AssetTrackerCustomizer(config, m_AssetDirectoryService, m_Logging, m_EventAdmin);
                break;
            case LINK_LAYER:
            case PHYSICAL_LINK:
            case TRANSPORT_LAYER:
                customizer = new CustomCommsTrackerCustomizer(config, m_CustomCommsService, m_Logging, m_EventAdmin);
                break;
            case STREAM_PROFILE:
                if (m_DataStreamService == null)
                {
                    m_PendingStreamProfiles.add(config);
                    return;
                }
                else
                {
                    customizer = new StreamProfileTrackerCustomizer(config, 
                            m_DataStreamService, m_Logging, m_EventAdmin);
                }
                break;
            default:
                throw new IllegalArgumentException("Unknown configuration factory type: " + type);
        }

        final Filter filter;
        if (type == FactoryTypeEnum.PHYSICAL_LINK)
        {
            filter = filterFromFilterString(getPhysicalLinkFilterString(config.getPhysicalLinkType()));
        }
        else
        {
            filter = filterFromKeyValuePair(FactoryDescriptor.PRODUCT_TYPE_SERVICE_PROPERTY, config.getProductType());
        }

        final ServiceTracker<FactoryDescriptor, FactoryDescriptor> tracker = 
                new ServiceTracker<FactoryDescriptor, FactoryDescriptor>(m_BundleContext, filter, customizer);
        tracker.open();

        m_ServiceTrackerList.add(tracker);
    }
/**
     * Creates the service tracker customizer for a {@link mil.dod.th.model.config.FactoryObjectConfig}.
     * 
     * @param config
     *            Factory object configuration
     * @throws IllegalArgumentException
     *            If an unknown factory type or invalid product type is provided in the factory object config
     */
Creates the service tracker customizer for a  mil.dod.th.model.config.FactoryObjectConfig.

@param config
Factory object configuration
@throws IllegalArgumentException
If an unknown factory type or invalid product type is provided in the factory object config
Creates the service tracker customizer for a mil . dod . th . model . config . FactoryObjectConfig . @param config Factory object configuration @throws IllegalArgumentException If an unknown factory type or invalid product type is provided in the factory object config
private void createTracker(final FactoryObjectConfig config)
            throws IllegalArgumentException
    {
        final FactoryTypeEnum type = config.getFactoryType();
        final ServiceTrackerCustomizer<FactoryDescriptor, FactoryDescriptor> customizer;
        switch (type)
        {
            case ASSET:
                customizer = new AssetTrackerCustomizer(config, m_AssetDirectoryService, m_Logging, m_EventAdmin);
                break;
            case LINK_LAYER:
            case PHYSICAL_LINK:
            case TRANSPORT_LAYER:
                customizer = new CustomCommsTrackerCustomizer(config, m_CustomCommsService, m_Logging, m_EventAdmin);
                break;
            case STREAM_PROFILE:
                if (m_DataStreamService == null)
                {
                    m_PendingStreamProfiles.add(config);
                    return;
                }
                else
                {
                    customizer = new StreamProfileTrackerCustomizer(config, 
                            m_DataStreamService, m_Logging, m_EventAdmin);
                }
                break;
            default:
                throw new IllegalArgumentException("Unknown configuration factory type: " + type);
        }
        final Filter filter;
        if (type == FactoryTypeEnum.PHYSICAL_LINK)
        {
            filter = filterFromFilterString(getPhysicalLinkFilterString(config.getPhysicalLinkType()));
        }
        else
        {
            filter = filterFromKeyValuePair(FactoryDescriptor.PRODUCT_TYPE_SERVICE_PROPERTY, config.getProductType());
        }
        final ServiceTracker<FactoryDescriptor, FactoryDescriptor> tracker = 
                new ServiceTracker<FactoryDescriptor, FactoryDescriptor>(m_BundleContext, filter, customizer);
        tracker.open();
        m_ServiceTrackerList.add(tracker);
    }
private void createTracker ( final FactoryObjectConfig config ) throws IllegalArgumentException { final FactoryTypeEnum type = config . getFactoryType ( ) ; final ServiceTrackerCustomizer < FactoryDescriptor , FactoryDescriptor > customizer ; switch ( type ) { case ASSET : customizer = new AssetTrackerCustomizer ( config , m_AssetDirectoryService , m_Logging , m_EventAdmin ) ; break ; case LINK_LAYER : case PHYSICAL_LINK : case TRANSPORT_LAYER : customizer = new CustomCommsTrackerCustomizer ( config , m_CustomCommsService , m_Logging , m_EventAdmin ) ; break ; case STREAM_PROFILE : if ( m_DataStreamService == null ) { m_PendingStreamProfiles . add ( config ) ; return ; } else { customizer = new StreamProfileTrackerCustomizer ( config , m_DataStreamService , m_Logging , m_EventAdmin ) ; } break ; default : throw new IllegalArgumentException ( "Unknown configuration factory type: " + type ) ; } final Filter filter ; if ( type == FactoryTypeEnum . PHYSICAL_LINK ) { filter = filterFromFilterString ( getPhysicalLinkFilterString ( config . getPhysicalLinkType ( ) ) ) ; } else { filter = filterFromKeyValuePair ( FactoryDescriptor . PRODUCT_TYPE_SERVICE_PROPERTY , config . getProductType ( ) ) ; } final ServiceTracker < FactoryDescriptor , FactoryDescriptor > tracker = new ServiceTracker < FactoryDescriptor , FactoryDescriptor > ( m_BundleContext , filter , customizer ) ; tracker . open ( ) ; m_ServiceTrackerList . add ( tracker ) ; }
Creates the service tracker customizer for a {@link mil.dod.th.model.config.FactoryObjectConfig}.
Creates the service tracker customizer for a { @link mil . dod . th . model . config . FactoryObjectConfig } .