java.util.EventListener, ProtocolCommandListenerpublic class PrintCommandListener extends java.lang.Object implements ProtocolCommandListener
| Constructor | Description |
|---|---|
PrintCommandListener(java.io.PrintStream stream) |
Create the default instance which prints everything.
|
PrintCommandListener(java.io.PrintStream stream,
boolean suppressLogin) |
Create an instance which optionally suppresses login command text
and indicates where the EOL starts with the specified character.
|
PrintCommandListener(java.io.PrintStream stream,
boolean suppressLogin,
char eolMarker) |
Create an instance which optionally suppresses login command text
and indicates where the EOL starts with the specified character.
|
PrintCommandListener(java.io.PrintStream stream,
boolean suppressLogin,
char eolMarker,
boolean showDirection) |
Create an instance which optionally suppresses login command text
and indicates where the EOL starts with the specified character.
|
PrintCommandListener(java.io.PrintWriter writer) |
Create the default instance which prints everything.
|
PrintCommandListener(java.io.PrintWriter writer,
boolean suppressLogin) |
Create an instance which optionally suppresses login command text.
|
PrintCommandListener(java.io.PrintWriter writer,
boolean suppressLogin,
char eolMarker) |
Create an instance which optionally suppresses login command text
and indicates where the EOL starts with the specified character.
|
PrintCommandListener(java.io.PrintWriter writer,
boolean suppressLogin,
char eolMarker,
boolean showDirection) |
Create an instance which optionally suppresses login command text
and indicates where the EOL starts with the specified character.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
protocolCommandSent(ProtocolCommandEvent event) |
This method is invoked by a ProtocolCommandEvent source after
sending a protocol command to a server.
|
void |
protocolReplyReceived(ProtocolCommandEvent event) |
This method is invoked by a ProtocolCommandEvent source after
receiving a reply from a server.
|
public PrintCommandListener(java.io.PrintStream stream)
stream - where to write the commands and responses
e.g. System.outpublic PrintCommandListener(java.io.PrintStream stream, boolean suppressLogin)
stream - where to write the commands and responsessuppressLogin - if true, only print command name for loginpublic PrintCommandListener(java.io.PrintStream stream, boolean suppressLogin, char eolMarker)
stream - where to write the commands and responsessuppressLogin - if true, only print command name for logineolMarker - if non-zero, add a marker just before the EOL.public PrintCommandListener(java.io.PrintStream stream, boolean suppressLogin, char eolMarker, boolean showDirection)
stream - where to write the commands and responsessuppressLogin - if true, only print command name for logineolMarker - if non-zero, add a marker just before the EOL.showDirection - if true, add "> " or "< " as appropriate to the outputpublic PrintCommandListener(java.io.PrintWriter writer)
writer - where to write the commands and responsespublic PrintCommandListener(java.io.PrintWriter writer, boolean suppressLogin)
writer - where to write the commands and responsessuppressLogin - if true, only print command name for loginpublic PrintCommandListener(java.io.PrintWriter writer, boolean suppressLogin, char eolMarker)
writer - where to write the commands and responsessuppressLogin - if true, only print command name for logineolMarker - if non-zero, add a marker just before the EOL.public PrintCommandListener(java.io.PrintWriter writer, boolean suppressLogin, char eolMarker, boolean showDirection)
writer - where to write the commands and responsessuppressLogin - if true, only print command name for logineolMarker - if non-zero, add a marker just before the EOL.showDirection - if true, add "> " or "< " as appropriate to the outputpublic void protocolCommandSent(ProtocolCommandEvent event)
ProtocolCommandListenerprotocolCommandSent in interface ProtocolCommandListenerevent - The ProtocolCommandEvent fired.public void protocolReplyReceived(ProtocolCommandEvent event)
ProtocolCommandListenerprotocolReplyReceived in interface ProtocolCommandListenerevent - The ProtocolCommandEvent fired.