public static String createSelectorFromAddress(String address){
  StringBuilder stringBuilder=new StringBuilder();
  if (!address.contains(",")) {
    if (address.startsWith("!")) {
      stringBuilder.append(ManagementHelper.HDR_ADDRESS + " NOT LIKE '" + address.substring(1,address.length())+ "%'");
    }
 else {
      stringBuilder.append(ManagementHelper.HDR_ADDRESS + " LIKE '" + address+ "%'");
    }
    return stringBuilder.toString();
  }
  return buildSelectorFromArray(address.split(","));
}

public static String createSelectorFromAddress ( String address ) { StringBuilder stringBuilder = new StringBuilder ( ) ; if ( ! address . contains ( "," ) ) { if ( address . startsWith ( "!" ) ) { stringBuilder . append ( ManagementHelper . HDR_ADDRESS + " NOT LIKE '" + address . substring ( 1 , address . length ( ) ) + "%'" ) ; } else { stringBuilder . append ( ManagementHelper . HDR_ADDRESS + " LIKE '" + address + "%'" ) ; } return stringBuilder . toString ( ) ; } return buildSelectorFromArray ( address . split ( "," ) ) ; }
takes in a string of an address filter or comma separated list and generates an appropriate jms selector for filtering queues .
