JMS api object now implement a toString() that can be used to correlate back to log messages on the message broker.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@358371 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2005-12-21 20:43:50 +00:00
parent 2040c9d75c
commit 22474cd541
12 changed files with 47 additions and 0 deletions

View File

@ -1542,4 +1542,8 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
public void setCopyMessageOnSend(boolean copyMessageOnSend) { public void setCopyMessageOnSend(boolean copyMessageOnSend) {
this.copyMessageOnSend = copyMessageOnSend; this.copyMessageOnSend = copyMessageOnSend;
} }
public String toString() {
return "ActiveMQConnection {id="+info.getConnectionId()+",clientId"+info.getClientId()+",started="+started.get()+"}";
}
} }

View File

@ -148,4 +148,8 @@ public class ActiveMQConnectionConsumer implements ConnectionConsumer, ActiveMQD
connection.onAsyncException(e); connection.onAsyncException(e);
} }
} }
public String toString() {
return "ActiveMQConnectionConsumer { consumerId=" +consumerInfo.getConsumerId()+" }";
}
} }

View File

@ -227,4 +227,8 @@ public class ActiveMQInputStream extends InputStream implements ActiveMQDispatch
unconsumedMessages.enqueue(md); unconsumedMessages.enqueue(md);
} }
public String toString() {
return "ActiveMQInputStream { consumerId="+info.getConsumerId()+", producerId=" +producerId+" }";
}
} }

View File

@ -728,4 +728,8 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
unconsumedMessages.stop(); unconsumedMessages.stop();
} }
public String toString() {
return "ActiveMQMessageConsumer { consumerId=" +info.getConsumerId()+", started=" +started.get()+" }";
}
} }

View File

@ -500,4 +500,8 @@ public class ActiveMQMessageProducer implements MessageProducer, StatsCapable, C
this.info = info; this.info = info;
} }
public String toString() {
return "ActiveMQMessageProducer { consumerId=" +info.getProducerId()+" }";
}
} }

View File

@ -155,4 +155,8 @@ public class ActiveMQOutputStream extends OutputStream implements Disposable {
connection.send(info.getDestination(), msg, id, deliveryMode, priority, timeToLive, !eosMessage); connection.send(info.getDestination(), msg, id, deliveryMode, priority, timeToLive, !eosMessage);
} }
public String toString() {
return "ActiveMQOutputStream { producerId=" +info.getProducerId()+" }";
}
} }

View File

@ -242,4 +242,9 @@ public class ActiveMQQueueBrowser implements
semaphore.notifyAll(); semaphore.notifyAll();
} }
} }
public String toString() {
return "ActiveMQQueueBrowser { consumerId=" +consumerId+" }";
}
} }

View File

@ -86,4 +86,5 @@ public class ActiveMQQueueReceiver extends ActiveMQMessageConsumer implements
checkClosed(); checkClosed();
return (Queue) super.getDestination(); return (Queue) super.getDestination();
} }
} }

View File

@ -1664,4 +1664,9 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
return executor.getUnconsumedMessages(); return executor.getUnconsumedMessages();
} }
public String toString() {
return "ActiveMQSession {id="+info.getSessionId()+",started="+started.get()+"}";
}
} }

View File

@ -143,4 +143,8 @@ public class PooledConnection implements TopicConnection, QueueConnection {
return (ActiveMQSession) getConnection().createSession(key.isTransacted(), key.getAckMode()); return (ActiveMQSession) getConnection().createSession(key.isTransacted(), key.getAckMode());
} }
public String toString() {
return "PooledConnection { "+pool+" }";
}
} }

View File

@ -126,4 +126,9 @@ public class PooledProducer implements MessageProducer {
protected ActiveMQMessageProducer getMessageProducer() { protected ActiveMQMessageProducer getMessageProducer() {
return messageProducer; return messageProducer;
} }
public String toString() {
return "PooledProducer { "+messageProducer+" }";
}
} }

View File

@ -280,4 +280,7 @@ public class PooledSession implements TopicSession, QueueSession {
return topicPublisher; return topicPublisher;
} }
public String toString() {
return "PooledSession { "+session+" }";
}
} }