Package com.rabbitmq.tools
Class Tracer
java.lang.Object
com.rabbitmq.tools.Tracer
- All Implemented Interfaces:
Runnable
AMQP Protocol Analyzer program. Listens on a port (in-port) and when a
connection arrives, makes an outbound connection to a host and
port (out-port). Relays frames from the in-port to the out-port.
Commands are decoded and printed to a supplied
Tracer.Logger.
The stand-alone program (main(String[])) prints to System.out,
using a private Tracer.AsyncLogger instance. When the connection closes
the program listens for a subsequent connection and traces that to the same Tracer.Logger.
This continues until the program is interrupted.
Options for controlling, for example, whether command bodies are decoded,
are obtained from System.properties, and are reported to the console
before starting the trace.
A Tracer object may be instantiated, using one of the constructors
Tracer(int listenPort, String id, String host, int port, Logger logger, Properties props)Tracer(String id)Tracer(String id, Properties props)where the missing parameters default as follows:listenPortdefaults to5673hostdefaults tolocalhostportdefaults to5672loggerdefaults tonew AsyncLogger(System.out) and
propsdefaults toSystem.getProperties()
start()ed which Tracer.Logger.start()s
the supplied logger and creates and starts a Thread for relaying and deconstructing the frames.
The properties specified in props are used at start() time and may be modified
before this call.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceLogging strings to an outputStream. -
Constructor Summary
ConstructorsConstructorDescriptionTracer(int listenPort, String id, String host, int port, Tracer.Logger logger, Properties props) Tracer(String id, Properties props) -
Method Summary
-
Constructor Details
-
Tracer
public Tracer(int listenPort, String id, String host, int port, Tracer.Logger logger, Properties props) throws IOException - Throws:
IOException
-
Tracer
- Throws:
IOException
-
Tracer
- Throws:
IOException
-
-
Method Details