[jboss-cvs] JBoss Messaging SVN: r4545 - trunk/src/main/org/jboss/messaging/jms/server.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jun 23 05:11:33 EDT 2008
Author: jmesnil
Date: 2008-06-23 05:11:33 -0400 (Mon, 23 Jun 2008)
New Revision: 4545
Removed:
trunk/src/main/org/jboss/messaging/jms/server/ConnectionInfo.java
trunk/src/main/org/jboss/messaging/jms/server/MessageStatistics.java
trunk/src/main/org/jboss/messaging/jms/server/SessionInfo.java
Log:
removed unused classes
Deleted: trunk/src/main/org/jboss/messaging/jms/server/ConnectionInfo.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/ConnectionInfo.java 2008-06-23 08:36:54 UTC (rev 4544)
+++ trunk/src/main/org/jboss/messaging/jms/server/ConnectionInfo.java 2008-06-23 09:11:33 UTC (rev 4545)
@@ -1,100 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.messaging.jms.server;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.text.SimpleDateFormat;
-import java.io.Serializable;
-
-/**
- * @author <a href="ataylor at redhat.com">Andy Taylor</a>
- */
-public class ConnectionInfo implements Serializable
-{
- private static final long serialVersionUID = -2525719954021417273L;
-
- private static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("HH:mm:ss, EEE, MMM d, yyyy");
-
- public enum status{ STARTED, STOPPED }
-
- private final long id;
- private final String user;
- private final String address;
- private final boolean started;
- private final long created;
-
- public ConnectionInfo(final long id, final String user, final String address,
- final boolean started, final long created)
- {
- this.id = id;
- this.user = user;
- this.address = address;
- this.started = started;
- this.created = created;
- }
-
- public long getId()
- {
- return id;
- }
-
- public String getUser()
- {
- return user;
- }
-
- public String getAddress()
- {
- return address;
- }
-
- public status getStatus()
- {
- return started? status.STARTED:status.STOPPED;
- }
-
- public String getTimeCreated()
- {
-
- Calendar calendar = Calendar.getInstance();
- calendar.setTime(new Date(created));
- return SIMPLE_DATE_FORMAT.format(calendar.getTime());
- }
-
- public String getAliveTime()
- {
- StringBuilder builder = new StringBuilder();
- Calendar calendar = Calendar.getInstance();
- calendar.setTime(new Date(System.currentTimeMillis() - created));
- builder.append(calendar.get(Calendar.DAY_OF_YEAR) - 1).append(" days ").append(calendar.get(Calendar.HOUR_OF_DAY)).
- append(" hours ").append(calendar.get(Calendar.MINUTE)).append(" minutes ").append(calendar.get(Calendar.SECOND)).
- append(" seconds.");
- return builder.toString();
- }
-
- public String toString()
- {
- return id + (user!=null?"(" + user + ")":"") + "@" + address + " started at " + getTimeCreated() + "," + "uptime " + getAliveTime() + "\n";
- }
-}
Deleted: trunk/src/main/org/jboss/messaging/jms/server/MessageStatistics.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/MessageStatistics.java 2008-06-23 08:36:54 UTC (rev 4544)
+++ trunk/src/main/org/jboss/messaging/jms/server/MessageStatistics.java 2008-06-23 09:11:33 UTC (rev 4545)
@@ -1,298 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.messaging.jms.server;
-
-import java.io.Serializable;
-import java.text.DateFormat;
-import java.util.Date;
-
-//FIXME this doesn't belong here
-
-/**
- * Message statistics
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version <tt>$Revision: 1.3 $</tt>
- */
-public class MessageStatistics implements Serializable
-{
- // Constants -----------------------------------------------------
-
- /** The serialVersionUID */
- static final long serialVersionUID = 8056884098781414022L;
-
- // Attributes ----------------------------------------------------
-
- /** Whether we are topic */
- private boolean topic;
-
- /** Whether we are durable */
- private boolean durable;
-
- /** The name */
- private String name;
-
- /** The subscription id */
- private String subscriptionID;
-
- /** The message count */
- private int count;
-
- private int totalMessageCount;
-
-
-
- /** The last update */
- private long timeLastUpdate;
- private int currentMessageCount;
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- /**
- * Construct a new Message Statistics
- */
- public MessageStatistics()
- {
- }
-
- // Public --------------------------------------------------------
-
- /**
- * Get the count.
- *
- * @return Returns the count.
- */
- public int getCount()
- {
- return count;
- }
-
- /**
- * Set the count.
- *
- * @param count The count to set.
- */
- public void setCount(int count)
- {
- this.count = count;
- }
-
- public int getTotalMessageCount()
- {
- return totalMessageCount;
- }
-
- public void setTotalMessageCount(int totalMessageCount)
- {
- this.totalMessageCount = totalMessageCount;
- }
-
- /**
- * Get the durable.
- *
- * @return Returns the durable.
- */
- public boolean isDurable()
- {
- return durable;
- }
-
- /**
- * Set the durable.
- *
- * @param durable The durable to set.
- */
- public void setDurable(boolean durable)
- {
- this.durable = durable;
- }
-
- /**
- * Get the name.
- *
- * @return Returns the name.
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Set the name.
- *
- * @param name The name to set.
- */
- public void setName(String name)
- {
- this.name = name;
- }
-
- /**
- * Get the subscriptionID.
- *
- * @return Returns the subscriptionID.
- */
- public String getSubscriptionID()
- {
- return subscriptionID;
- }
-
- /**
- * Set the subscriptionID.
- *
- * @param subscriptionID The subscriptionID to set.
- */
- public void setSubscriptionID(String subscriptionID)
- {
- this.subscriptionID = subscriptionID;
- }
-
- /**
- * Get the timeLastUpdate.
- *
- * @return Returns the timeLastUpdate.
- */
- public long getTimeLastUpdate()
- {
- return timeLastUpdate;
- }
-
- /**
- * Set the timeLastUpdate.
- *
- * @param timeLastUpdate The timeLastUpdate to set.
- */
- public void setTimeLastUpdate(long timeLastUpdate)
- {
- this.timeLastUpdate = timeLastUpdate;
- }
-
-
- public int getCurrentMessageCount()
- {
- return this.currentMessageCount;
- }
-
- public void setCurrentMessageCount(int currentMessageCount)
- {
- this.currentMessageCount = currentMessageCount;
- }
-
- /**
- * Get the topic.
- *
- * @return Returns the topic.
- */
- public boolean isTopic()
- {
- return topic;
- }
-
- /**
- * Set the topic.
- *
- * @param topic The topic to set.
- */
- public void setTopic(boolean topic)
- {
- this.topic = topic;
- }
-
- /**
- * Get message data as string in format
- *
- * "Topic/Queue, Name, Subscription, Durable, Count, CountDelta,
- * Depth, DepthDelta, Timestamp Last Increment"
- *
- * @return String data as a string
- */
- public String getAsString()
- {
- StringBuffer buffer = new StringBuffer(50);
-
- // Topic/Queue
- if (topic)
- buffer.append("Topic,");
- else
- buffer.append("Queue,");
-
- // name
- buffer.append(name).append(',');
-
- // subscription
- if (subscriptionID != null)
- buffer.append(subscriptionID).append(',');
- else
- buffer.append("-,");
-
- // Durable subscription
- if (topic)
- {
- // Topic
- if (durable)
- buffer.append("DURABLE,");
- else
- buffer.append("NONDURABLE,");
- }
- else
- {
- buffer.append("-,");
- }
-
- // counter values
- buffer.append("total messages received = ").append(getTotalMessageCount()).append(",").
- append("current messages in queue = ").append(getCurrentMessageCount()).append(",").
- append("current message count = ").append(getCount()).append(",");
- // timestamp last counter update
- if (timeLastUpdate > 0)
- {
- DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
-
- buffer.append(dateFormat.format(new Date(timeLastUpdate)));
- }
- else
- {
- buffer.append('-');
- }
-
- return buffer.toString();
- }
-
- // Object overrides ----------------------------------------------
-
- public String toString()
- {
- return getAsString();
- }
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
-}
\ No newline at end of file
Deleted: trunk/src/main/org/jboss/messaging/jms/server/SessionInfo.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/SessionInfo.java 2008-06-23 08:36:54 UTC (rev 4544)
+++ trunk/src/main/org/jboss/messaging/jms/server/SessionInfo.java 2008-06-23 09:11:33 UTC (rev 4545)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.messaging.jms.server;
-
-import java.io.Serializable;
-
-/**
- * Information regarding to a session
- * @author <a href="ataylor at redhat.com">Andy Taylor</a>
- */
-public class SessionInfo implements Serializable
-{
- private final long id;
-
- private final long connectionID;
-
- public SessionInfo(final long id, final long connectionID)
- {
- this.id = id;
- this.connectionID = connectionID;
- }
-
- public long getId()
- {
- return id;
- }
-
- public long getConnectionID()
- {
- return connectionID;
- }
-
- public String toString()
- {
- return id + "@" + connectionID + "\n";
- }
-}
More information about the jboss-cvs-commits
mailing list