src/net/java/sip/communicator/service/protocol/JingleNodeDescriptor.java
/**
     * Loads this descriptor from the specified {@link Map}.The method is meant
     * for use with account property maps. It also allows prepending an account
     * prefix to all property names so that multiple descriptors can be read
     * in a single {@link Map}.
     *
     * @param props the account properties {@link Map} that we'd like to load
     * this descriptor from.
     * @param namePrefix the prefix that we should prepend to every property
     * name.
     *
     * @return the newly created descriptor or null if no descriptor was found.
     */
Loads this descriptor from the specified  Map.The method is meant
for use with account property maps. It also allows prepending an account
prefix to all property names so that multiple descriptors can be read
in a single  Map.

@param props the account properties  Map that we'd like to load
this descriptor from.
@param namePrefix the prefix that we should prepend to every property
name.

@return the newly created descriptor or null if no descriptor was found.
Loads this descriptor from the specified Map . The method is meant for use with account property maps . It also allows prepending an account prefix to all property names so that multiple descriptors can be read in a single Map . @param props the account properties Map that we ' d like to load this descriptor from . @param namePrefix the prefix that we should prepend to every property name . @return the newly created descriptor or null if no descriptor was found .
public static JingleNodeDescriptor loadDescriptor(
                                        Map<String, String> props,
                                        String              namePrefix)
    {
        if(namePrefix == null)
            namePrefix = "";
        String relayAddress = props.get(namePrefix + JN_ADDRESS);
        if (relayAddress == null)
            return null;
        String relayStr = props.get(namePrefix + JN_IS_RELAY_SUPPORTED);
        boolean relay = false;
        try
        {
            relay = Boolean.parseBoolean(relayStr);
        }
        catch(Throwable t)
        {
        }
        try
        {
            return new JingleNodeDescriptor(JidCreate.from(relayAddress),
                                        relay);
        }
        catch (XmppStringprepException e)
        {
            return null;
        }
    }
public static JingleNodeDescriptor loadDescriptor ( Map < String , String > props , String namePrefix ) { if ( namePrefix == null ) namePrefix = "" ; String relayAddress = props . get ( namePrefix + JN_ADDRESS ) ; if ( relayAddress == null ) return null ; String relayStr = props . get ( namePrefix + JN_IS_RELAY_SUPPORTED ) ; boolean relay = false ; try { relay = Boolean . parseBoolean ( relayStr ) ; } catch ( Throwable t ) { } try { return new JingleNodeDescriptor ( JidCreate . from ( relayAddress ) , relay ) ; } catch ( XmppStringprepException e ) { return null ; } }
Loads this descriptor from the specified {@link Map}.The method is meant
 for use with account property maps.
Loads this descriptor from the specified { @link Map } . The method is meant for use with account property maps .