diff options
author | Bhupendra Bhusman Bhardwaj <bhupendrab@apache.org> | 2007-01-15 16:10:59 +0000 |
---|---|---|
committer | Bhupendra Bhusman Bhardwaj <bhupendrab@apache.org> | 2007-01-15 16:10:59 +0000 |
commit | 23ad76b344c064a926152a6728b0838bbf446f22 (patch) | |
tree | 5cf803e33209dc290d0711ff37e80f230da6e6a6 /java | |
parent | 722425e4d5db1e01f2d4ff2e46d03e1187da8407 (diff) | |
download | qpid-python-23ad76b344c064a926152a6728b0838bbf446f22.tar.gz |
QPID-295
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@496384 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java | 34 | ||||
-rw-r--r-- | java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java | 13 |
2 files changed, 35 insertions, 12 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java index fb4a8e06bf..012b3600ca 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java +++ b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java @@ -54,16 +54,16 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue private AMQQueue _queue = null; private String _queueName = null; // OpenMBean data types for viewMessages method - private String[] _msgAttributeNames = {"Message Id", "Header", "Size(bytes)", "Redelivered"}; - private String[] _msgAttributeIndex = {_msgAttributeNames[0]}; - private OpenType[] _msgAttributeTypes = new OpenType[4]; // AMQ message attribute types. - private CompositeType _messageDataType = null; // Composite type for representing AMQ Message data. - private TabularType _messagelistDataType = null; // Datatype for representing AMQ messages list. + private final static String[] _msgAttributeNames = {"AMQ MessageId", "Header", "Size(bytes)", "Redelivered"}; + private static String[] _msgAttributeIndex = {_msgAttributeNames[0]}; + private static OpenType[] _msgAttributeTypes = new OpenType[4]; // AMQ message attribute types. + private static CompositeType _messageDataType = null; // Composite type for representing AMQ Message data. + private static TabularType _messagelistDataType = null; // Datatype for representing AMQ messages list. // OpenMBean data types for viewMessageContent method - private CompositeType _msgContentType = null; - private String[] _msgContentAttributes = {"Message Id", "MimeType", "Encoding", "Content"}; - private OpenType[] _msgContentAttributeTypes = new OpenType[4]; + private static CompositeType _msgContentType = null; + private final static String[] _msgContentAttributes = {"AMQ MessageId", "MimeType", "Encoding", "Content"}; + private static OpenType[] _msgContentAttributeTypes = new OpenType[4]; @MBeanConstructor("Creates an MBean exposing an AMQQueue") public AMQQueueMBean(AMQQueue queue) throws JMException @@ -71,13 +71,25 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue super(ManagedQueue.class, ManagedQueue.TYPE); _queue = queue; _queueName = jmxEncode(new StringBuffer(queue.getName()), 0).toString(); - init(); + } + + static + { + try + { + init(); + } + catch(JMException ex) + { + // It should never occur + System.out.println(ex.getMessage()); + } } /** * initialises the openmbean data types */ - private void init() throws OpenDataException + private static void init() throws OpenDataException { _msgContentAttributeTypes[0] = SimpleType.LONG; // For message id _msgContentAttributeTypes[1] = SimpleType.STRING; // For MimeType @@ -376,4 +388,4 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue return new MBeanNotificationInfo[]{info1}; } -} // End of AMQMBean class +} // End of AMQQueueMBean class diff --git a/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java b/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java index 7c881c5a78..b891c914ec 100644 --- a/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java +++ b/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java @@ -638,7 +638,18 @@ public class BasicContentHeaderProperties implements ContentHeaderProperties public String toString() { - return "reply-to = " + _replyTo + " propertyFlags = " + _propertyFlags; + return "reply-to = " + _replyTo + + ",propertyFlags = " + _propertyFlags + + ",ApplicationID = " + _appId + + ",ClusterID = " + _clusterId + + ",UserId = " + _userId + + ",JMSMessageID = " + _messageId + + ",JMSCorrelationID = " + _correlationId + + ",JMSDeliveryMode = " + _deliveryMode + + ",JMSExpiration = " + _expiration + + ",JMSPriority = " + _priority + + ",JMSTimestamp = " + _timestamp + + ",JMSType = " + _type; } // MapMessage Interface |