public class ImaJmsObject
extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COPYRIGHT |
Constructor and Description |
---|
ImaJmsObject() |
Modifier and Type | Method and Description |
---|---|
static int |
bodySize(javax.jms.Message msg)
Return the size in bytes of the message body.
|
static String |
getClientVerstion()
Gets the IBM MessageSight JMS client version.
|
static ImaProperties |
getProperties(Object obj)
Gets the properties for an IBM MessageSight JMS client object.
|
static String |
toString(Object obj,
String details)
Return a string form of an IBM MessageSight JMS client object with details.
|
public static final String COPYRIGHT
public static String toString(Object obj, String details)
These detailed strings are designed to be viewed by humans to help in problem determination and might not be fully parsable. They are also not guaranteed to remain the same over time. All information in the detailed string is available using the public interfaces to the IBM MessageSight JMS client but show implementation details which are not part of the JMS interfaces and which are likely to change from release to release.
The detailed strings are in the form:
class@hashcode info=value details=value links=value properties=valueThe class name is the implementation class name for the object which is commonly the JMS interface name with the string "Ima" prepended. These classes commonly implement both the Topic and Queue messaging domains. The hashcode is shown to allow the unique object to be determined.
Each of the sections info, details, and links consists of a set of key=value pairs. If an item is not set or has a default value the key=value is not shown and the entire section can be missing. Not all sections are available for all objects.
The properties sections consists of the keyword properties and the value which is the toString() of a Java properties object.
Newlines may be added to the string to increase readability.
The details string is a set of characters each of which define the presence of one of the sections. All sections are optional. Additional codes are reserved for future use but are not checked. The following codes can be set:
obj
- The object to show.details
- The details stringpublic static int bodySize(javax.jms.Message msg)
If the body is null a size of -1 is returned.
msg
- The message which must be an IBM MessageSight JMS client messageClassCastException
- If the message is not an IBM MessageSight messagepublic static ImaProperties getProperties(Object obj)
This method works for objects which implement the ImaProperties interface. The objects with properties which are not administered objects (including the IBM MessageSight JMS client implementations of Connection, Session, MessageConsumer, and MessageProducer) return read only properties. Only user properties can be modified in these objects.
This is just a convenience method as it simply casts the object to ImaProperties. The invoker should make sure that the object is an instance of ImaProperties before using this method.
obj
- The object from which to return the properties.ClassCastException
- if the object does not implement ImaProperties (RuntimeException)public static String getClientVerstion()
This method returns the IBM MessageSight client version.
Copyright © Contributors to the Eclipse Foundation 2012-2021.