[jboss-cvs] JBoss Messaging SVN: r6108 - trunk/src/main/org/jboss/messaging/jms/server/management/impl.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Mar 18 12:46:00 EDT 2009
Author: jmesnil
Date: 2009-03-18 12:45:59 -0400 (Wed, 18 Mar 2009)
New Revision: 6108
Modified:
trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementHelper.java
Log:
removed unused methods
Modified: trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementHelper.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementHelper.java 2009-03-18 15:36:13 UTC (rev 6107)
+++ trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementHelper.java 2009-03-18 16:45:59 UTC (rev 6108)
@@ -28,17 +28,9 @@
import static org.jboss.messaging.core.client.management.impl.ManagementHelper.HDR_JMX_OPERATION_PREFIX;
import static org.jboss.messaging.core.client.management.impl.ManagementHelper.HDR_JMX_OPERATION_SUCCEEDED;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
import javax.jms.JMSException;
import javax.jms.Message;
import javax.management.ObjectName;
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.TabularData;
/*
* @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
@@ -89,36 +81,6 @@
return !(isOperationResult(message));
}
- public static TabularData getTabularDataProperty(final Message message, final String key) throws JMSException
- {
- Object object = message.getObjectProperty(key);
- if (object instanceof byte[])
- {
- return (TabularData)from((byte[])object);
- }
- throw new IllegalArgumentException(key + " property is not a valid TabularData");
- }
-
- public static Object[] getArrayProperty(final Message message, final String key) throws JMSException
- {
- Object object = message.getObjectProperty(key);
- if (object instanceof byte[])
- {
- return (Object[])from((byte[])object);
- }
- throw new IllegalArgumentException(key + " property is not a valid array");
- }
-
- public static CompositeData getCompositeDataProperty(final Message message, final String key) throws JMSException
- {
- Object object = message.getObjectProperty(key);
- if (object instanceof byte[])
- {
- return (CompositeData)from((byte[])object);
- }
- throw new IllegalArgumentException(key + " property is not a valid CompositeData");
- }
-
public static boolean hasOperationSucceeded(final Message message) throws JMSException
{
if (!isOperationResult(message))
@@ -179,14 +141,6 @@
{
message.setStringProperty(key, (String)typedProperty);
}
- else if (typedProperty instanceof TabularData || typedProperty instanceof CompositeData)
- {
- storePropertyAsBytes(message, key, typedProperty);
- }
- else if (typedProperty != null && typedProperty.getClass().isArray())
- {
- storePropertyAsBytes(message, key, typedProperty);
- }
// serialize as a SimpleString
else
{
@@ -194,21 +148,6 @@
}
}
- public static Object from(final byte[] bytes)
- {
- ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
- ObjectInputStream ois;
- try
- {
- ois = new ObjectInputStream(bais);
- return ois.readObject();
- }
- catch (Exception e)
- {
- throw new IllegalStateException(e);
- }
- }
-
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
@@ -219,19 +158,5 @@
// Private -------------------------------------------------------
- private static void storePropertyAsBytes(final Message message, final String key, final Object property)
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- try
- {
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(property);
- }
- catch (IOException e)
- {
- throw new IllegalStateException(property + " can not be written to a byte array");
- }
- //message.setBytesProperty(key, baos.toByteArray());
- }
// Inner classes -------------------------------------------------
}
More information about the jboss-cvs-commits
mailing list