You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by bh...@apache.org on 2007/01/15 17:11:00 UTC
svn commit: r496384 - in /incubator/qpid/trunk/qpid/java:
broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
Author: bhupendrab
Date: Mon Jan 15 08:10:59 2007
New Revision: 496384
URL: http://svn.apache.org/viewvc?view=rev&rev=496384
Log:
QPID-295
Modified:
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java?view=diff&rev=496384&r1=496383&r2=496384
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java Mon Jan 15 08:10:59 2007
@@ -54,16 +54,16 @@
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 @@
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 @@
return new MBeanNotificationInfo[]{info1};
}
-} // End of AMQMBean class
+} // End of AMQQueueMBean class
Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java?view=diff&rev=496384&r1=496383&r2=496384
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java Mon Jan 15 08:10:59 2007
@@ -638,7 +638,18 @@
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