Package org.apache.activemq.artemis.ra
Class ActiveMQRaUtils
- java.lang.Object
-
- org.apache.activemq.artemis.ra.ActiveMQRaUtils
-
public final class ActiveMQRaUtils extends Object
Various utility functions
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancompare(Boolean me, Boolean you)Compare two booleans.static booleancompare(Double me, Double you)Compare two doubles.static booleancompare(Integer me, Integer you)Compare two integers.static booleancompare(Long me, Long you)Compare two longs.static booleancompare(String me, String you)Compare two strings.static org.jgroups.JChannellocateJGroupsChannel(String locatorClass, String name)Within AS7 the RA is loaded by JCA.static Objectlookup(Context context, String name, Class<?> clazz)Lookup an object in the default initial contextstatic List<Map<String,Object>>parseConfig(String config)static List<String>parseConnectorConnectorConfig(String config)static Hashtable<String,String>parseHashtableConfig(String config)Used on parsing JNDI Configuration
-
-
-
Method Detail
-
compare
public static boolean compare(String me, String you)
Compare two strings.- Parameters:
me- First valueyou- Second value- Returns:
- True if object equals else false.
-
compare
public static boolean compare(Integer me, Integer you)
Compare two integers.- Parameters:
me- First valueyou- Second value- Returns:
- True if object equals else false.
-
compare
public static boolean compare(Long me, Long you)
Compare two longs.- Parameters:
me- First valueyou- Second value- Returns:
- True if object equals else false.
-
compare
public static boolean compare(Double me, Double you)
Compare two doubles.- Parameters:
me- First valueyou- Second value- Returns:
- True if object equals else false.
-
compare
public static boolean compare(Boolean me, Boolean you)
Compare two booleans.- Parameters:
me- First valueyou- Second value- Returns:
- True if object equals else false.
-
lookup
public static Object lookup(Context context, String name, Class<?> clazz) throws Exception
Lookup an object in the default initial context- Parameters:
context- The context to usename- the name to lookupclazz- the expected type- Returns:
- the object
- Throws:
Exception- for any error
-
parseHashtableConfig
public static Hashtable<String,String> parseHashtableConfig(String config)
Used on parsing JNDI Configuration- Parameters:
config-- Returns:
- hash-table with configuration option pairs
-
parseConnectorConnectorConfig
public static List<String> parseConnectorConnectorConfig(String config)
-
locateJGroupsChannel
public static org.jgroups.JChannel locateJGroupsChannel(String locatorClass, String name)
Within AS7 the RA is loaded by JCA. properties can only be passed in String form. However if RA is configured using jgroups stack, we need to pass a Channel object. As is impossible with JCA, we use this method to allow a JChannel object to be located.
-
-