public class PrintCommandListener extends java.lang.Object implements ProtocolCommandListener
构造器和说明 |
---|
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.
|
限定符和类型 | 方法和说明 |
---|---|
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)
ProtocolCommandListener
protocolCommandSent
在接口中 ProtocolCommandListener
event
- The ProtocolCommandEvent fired.public void protocolReplyReceived(ProtocolCommandEvent event)
ProtocolCommandListener
protocolReplyReceived
在接口中 ProtocolCommandListener
event
- The ProtocolCommandEvent fired.