Modifier and Type | Field and Description |
---|---|
static int |
CC_CLOSE_SESSION |
static int |
CC_CREATE_SESSION |
static int |
CC_PRIV_CHANGE |
static int |
CC_START_SESSION |
static String |
FIELD_OPERATION_PARAMETERS |
static String |
FIELD_PRIVS |
static String |
FIELD_SESSION_PROPERTIES |
static String |
FIELD_TRANSPORT_PROPERTIES |
static String |
FIELD_USER |
static Object |
PROP_USING_SESSION_START |
Constructor and Description |
---|
MessageHelper() |
Modifier and Type | Method and Description |
---|---|
static MapValue |
attributesToMap(Map<String,Variant> attributes) |
static Message |
closeSession() |
static OperationParameters |
convertOperationParameters(Value value) |
static Message |
createPrivilegeChange(Set<String> privileges) |
static Message |
createSession(Properties props)
Construct a CC_CREATE_SESSION message
|
static Message |
createSessionACK(Message inputMessage,
Map<String,String> sessionProperties,
Map<String,String> transportProperties) |
static void |
encodeOperationParameters(OperationParameters operationParameters,
Message message) |
static Set<String> |
getPrivileges(Message message) |
static void |
getProperties(Properties properties,
Value value)
Convert a map value to properties
|
static Map<String,Variant> |
mapToAttributes(MapValue mapValue)
Convert a MapValue to a attributes map
|
static Variant |
valueToVariant(Value value,
Variant defaultValue) |
static Value |
variantToValue(Variant value) |
public static final int CC_CREATE_SESSION
public static final int CC_CLOSE_SESSION
public static final int CC_PRIV_CHANGE
public static final int CC_START_SESSION
public static final String FIELD_SESSION_PROPERTIES
public static final String FIELD_TRANSPORT_PROPERTIES
public static final String FIELD_PRIVS
public static final Object PROP_USING_SESSION_START
public static final String FIELD_USER
public static final String FIELD_OPERATION_PARAMETERS
public static Map<String,Variant> mapToAttributes(MapValue mapValue)
mapValue
- the map value to convertpublic static Message createSession(Properties props)
props
- the session propertiespublic static Message closeSession()
public static void getProperties(Properties properties, Value value)
If the value is not a MapValue
or is null
the
properties will not be modified.
properties
- the properties to fillvalue
- the value to parsepublic static Message createSessionACK(Message inputMessage, Map<String,String> sessionProperties, Map<String,String> transportProperties)
public static OperationParameters convertOperationParameters(Value value)
public static void encodeOperationParameters(OperationParameters operationParameters, Message message)