public final class AMQPTransportUtils extends Object
Constructor and Description |
---|
AMQPTransportUtils() |
Modifier and Type | Method and Description |
---|---|
static com.rabbitmq.client.Address[] |
getAddressArray(String addressString,
String regex,
char subRegex)
Digest the address array in the form hostName1:portNumber1,hostName2:portNumber2,hostName3:portNumber3
|
static Boolean |
getBooleanProperty(String name,
boolean def) |
static double |
getDoubleProperty(String name,
double def) |
static int |
getIntProperty(String name,
int def)
Read the value of a int property.
|
static long |
getLongProperty(String name,
long def)
Read the value of a property of type long
|
static Boolean |
getOptionalBooleanParameter(String key,
Map<String,String> srcMap1,
Map<String,String> srcMap2) |
static Double |
getOptionalDoubleParameter(String key,
Map<String,String> srcMap1,
Map<String,String> srcMap2) |
static Integer |
getOptionalIntParameter(String key,
Map<String,String> srcMap1,
Map<String,String> srcMap2) |
static String |
getOptionalStringParameter(String key,
Map<String,String> srcMap1,
Map<String,String> srcMap2) |
static Map<String,String> |
getServiceStringParameters(List<org.apache.axis2.description.Parameter> list) |
static String |
getStringProperty(String name,
String def)
Read the value of a string property.
|
static void |
moveElements(BlockingQueue<AMQPTransportMessage> src,
List<AMQPTransportMessage> dest,
int blockSize)
Move elements between buffers.
|
static Map<String,String> |
parseAMQPUri(String amqpUri) |
static String[] |
split(String src,
String delimiter) |
public static String getStringProperty(String name, String def) throws NumberFormatException
name
- name of the property.def
- default value.NumberFormatException
- in case invalid property value.public static int getIntProperty(String name, int def) throws NumberFormatException
name
- name of the property.def
- default value if no value is found.NumberFormatException
- in case of an invalid property value.public static long getLongProperty(String name, long def) throws NumberFormatException
name
- name of the propertydef
- value of the propertyNumberFormatException
- throws in case of an error.public static double getDoubleProperty(String name, double def) throws NumberFormatException
NumberFormatException
public static Boolean getBooleanProperty(String name, boolean def) throws NumberFormatException
NumberFormatException
public static Map<String,String> getServiceStringParameters(List<org.apache.axis2.description.Parameter> list)
public static String getOptionalStringParameter(String key, Map<String,String> srcMap1, Map<String,String> srcMap2)
public static Boolean getOptionalBooleanParameter(String key, Map<String,String> srcMap1, Map<String,String> srcMap2)
public static Integer getOptionalIntParameter(String key, Map<String,String> srcMap1, Map<String,String> srcMap2) throws AMQPTransportException
AMQPTransportException
public static Double getOptionalDoubleParameter(String key, Map<String,String> srcMap1, Map<String,String> srcMap2) throws AMQPTransportException
AMQPTransportException
public static com.rabbitmq.client.Address[] getAddressArray(String addressString, String regex, char subRegex) throws NumberFormatException
addressString
- Address array stringregex
- the first regex to split the stringsubRegex
- the sub regex to split the stringNumberFormatException
- in case an invalid port.public static void moveElements(BlockingQueue<AMQPTransportMessage> src, List<AMQPTransportMessage> dest, int blockSize) throws AMQPTransportException
BlockingQueue.drainTo(java.util.Collection, int)
src
- source bufferdest
- destination bufferblockSize
- blockSize of message bulk that need to moveAMQPTransportException
- in case of drains failspublic static Map<String,String> parseAMQPUri(String amqpUri) throws AMQPTransportException
AMQPTransportException
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.