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) {
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);
}
}
public String toString() {
return "ActiveMQConnectionConsumer { consumerId=" +consumerInfo.getConsumerId()+" }";
}
}

View File

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

View File

@ -727,5 +727,9 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
started.set(false);
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;
}
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);
}
public String toString() {
return "ActiveMQOutputStream { producerId=" +info.getProducerId()+" }";
}
}

View File

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

View File

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

View File

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

View File

@ -142,5 +142,9 @@ public class PooledConnection implements TopicConnection, QueueConnection {
protected ActiveMQSession createSession(SessionKey key) throws JMSException {
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() {
return messageProducer;
}
public String toString() {
return "PooledProducer { "+messageProducer+" }";
}
}

View File

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