mirror of https://github.com/apache/activemq.git
make the protocol tracing configurable.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1409417 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dd0b16d38b
commit
cf70ce97ee
|
@ -85,12 +85,14 @@ class AmqpProtocolConverter {
|
||||||
// private String clientId;
|
// private String clientId;
|
||||||
// private final String QOS_PROPERTY_NAME = "QoSPropertyName";
|
// private final String QOS_PROPERTY_NAME = "QoSPropertyName";
|
||||||
int prefetch = 100;
|
int prefetch = 100;
|
||||||
|
boolean trace = false;
|
||||||
|
|
||||||
TransportImpl protonTransport = new TransportImpl();
|
TransportImpl protonTransport = new TransportImpl();
|
||||||
ConnectionImpl protonConnection = new ConnectionImpl();
|
ConnectionImpl protonConnection = new ConnectionImpl();
|
||||||
|
|
||||||
{
|
{
|
||||||
this.protonTransport.bind(this.protonConnection);
|
this.protonTransport.bind(this.protonConnection);
|
||||||
|
if( trace ) {
|
||||||
this.protonTransport.setProtocolTracer(new ProtocolTracer() {
|
this.protonTransport.setProtocolTracer(new ProtocolTracer() {
|
||||||
@Override
|
@Override
|
||||||
public void receivedFrame(TransportFrame transportFrame) {
|
public void receivedFrame(TransportFrame transportFrame) {
|
||||||
|
@ -102,7 +104,7 @@ class AmqpProtocolConverter {
|
||||||
System.out.println(String.format("%s | SENT: %s", amqpTransport.getRemoteAddress(), transportFrame.getBody()));
|
System.out.println(String.format("%s | SENT: %s", amqpTransport.getRemoteAddress(), transportFrame.getBody()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void pumpProtonToSocket() {
|
void pumpProtonToSocket() {
|
||||||
|
|
Loading…
Reference in New Issue