public class MessagingUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MessagingUtil.Topics
Enum for Messaging topics
|
| Constructor and Description |
|---|
MessagingUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getEventClassNameForTopic(String topic)
Get the event name for topic
|
static String |
getMessageTopicName(Event event)
Get the Message topic name for event
|
static String |
getMessagingProtocol() |
static Integer |
getNumericSystemProperty(Integer defaultValue,
String propertyKey)
Method to safely access numeric system properties
|
static Properties |
getProperties(String filePath)
Properties of the given file
|
static String |
getRandomString(int len)
Get the random string with UUID
|
static int |
getSubscriberFailoverInterval()
Fetch value from system param
|
static Object |
jsonToObject(String json,
Class type)
Transform json into an object of given type.
|
static String |
ObjectToJson(Object obj)
Create a JSON string
|
static void |
validateTenantRange(String tenantRange)
Validate tenant range.
|
public static Properties getProperties(String filePath)
filePath - path of the property filepublic static void validateTenantRange(String tenantRange)
tenantRange - Tenant rangepublic static Object jsonToObject(String json, Class type)
json - json stringtype - type of the classpublic static String ObjectToJson(Object obj)
obj - objectpublic static int getSubscriberFailoverInterval()
public static Integer getNumericSystemProperty(Integer defaultValue, String propertyKey)
defaultValue - default value of the propertypropertyKey - property keypublic static String getMessagingProtocol()
public static String getMessageTopicName(Event event)
event - event namepublic static String getEventClassNameForTopic(String topic)
topic - topic Namepublic static String getRandomString(int len)
len - length of the StringCopyright © 2012–2016 The Apache Software Foundation. All rights reserved.