mil.dod.th.ose.config/src/mil/dod/th/ose/config/loading/impl/AddressLoaderImpl.java
private Filter filterFromAddrDesc(final String addrDesc)
    {
        final String errorMessage = String.format(
                "AddressConfig description [%s] is invalid as it does not contain a prefix and a suffix",
                addrDesc);
        
        final String[] addressParts = addrDesc.split(":", 2);
        if (addressParts.length != 2)
        {
            throw new IllegalArgumentException(errorMessage);
        }
        
        final String prefix = addressParts[0];
        if (prefix.isEmpty())
        {
            throw new IllegalArgumentException(errorMessage);
        }

        final String serviceMatch = String.format("(%s=%s)", AddressFactory.ADDRESS_FACTORY_PREFIX_SERVICE_PROPERTY,
                prefix);

        return filterFromFilterString(serviceMatch);
    }
/**
     * Method to generate an OSGi filter from an address description.
     * 
     * @param addrDesc
     *  address description that is to be used for the filter
     * @return
     *  the {@link Filter} object that has the prefix from the given description as its filter
     */
Method to generate an OSGi filter from an address description.

@param addrDesc
address description that is to be used for the filter
@return
the  Filter object that has the prefix from the given description as its filter
Method to generate an OSGi filter from an address description . @param addrDesc address description that is to be used for the filter @return the Filter object that has the prefix from the given description as its filter
private Filter filterFromAddrDesc(final String addrDesc)
    {
        final String errorMessage = String.format(
                "AddressConfig description [%s] is invalid as it does not contain a prefix and a suffix",
                addrDesc);
        final String[] addressParts = addrDesc.split(":", 2);
        if (addressParts.length != 2)
        {
            throw new IllegalArgumentException(errorMessage);
        }
        final String prefix = addressParts[0];
        if (prefix.isEmpty())
        {
            throw new IllegalArgumentException(errorMessage);
        }
        final String serviceMatch = String.format("(%s=%s)", AddressFactory.ADDRESS_FACTORY_PREFIX_SERVICE_PROPERTY,
                prefix);
        return filterFromFilterString(serviceMatch);
    }
private Filter filterFromAddrDesc ( final String addrDesc ) { final String errorMessage = String . format ( "AddressConfig description [%s] is invalid as it does not contain a prefix and a suffix" , addrDesc ) ; final String [ ] addressParts = addrDesc . split ( ":" , 2 ) ; if ( addressParts . length != 2 ) { throw new IllegalArgumentException ( errorMessage ) ; } final String prefix = addressParts [ 0 ] ; if ( prefix . isEmpty ( ) ) { throw new IllegalArgumentException ( errorMessage ) ; } final String serviceMatch = String . format ( "(%s=%s)" , AddressFactory . ADDRESS_FACTORY_PREFIX_SERVICE_PROPERTY , prefix ) ; return filterFromFilterString ( serviceMatch ) ; }
Method to generate an OSGi filter from an address description.
Method to generate an OSGi filter from an address description .