FileDocCategorySizeDatePackage
PrintCommandListener.javaAPI DocApache Commons NET 1.4.1 API1498Sat Dec 03 10:05:48 GMT 2005examples

PrintCommandListener

public class PrintCommandListener extends Object implements org.apache.commons.net.ProtocolCommandListener
This is a support class for some of the example programs. It is a sample implementation of the ProtocolCommandListener interface which just prints out to a specified stream all command/reply traffic.

Fields Summary
private PrintWriter
__writer
Constructors Summary
public PrintCommandListener(PrintWriter writer)

        __writer = writer;
    
Methods Summary
public voidprotocolCommandSent(org.apache.commons.net.ProtocolCommandEvent event)

        __writer.print(event.getMessage());
        __writer.flush();
    
public voidprotocolReplyReceived(org.apache.commons.net.ProtocolCommandEvent event)

        __writer.print(event.getMessage());
        __writer.flush();