ProtocolCommandSupport (Commons Net 3.3 API)
JavaScript is disabled on your browser.
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Class
Next Class
Frames
No Frames
All Classes
Summary:
Nested |
Field |
Constr |
Method
Detail:
Field |
Constr |
Method
org.apache.commons.net
Class ProtocolCommandSupport
java.lang.Object
org.apache.commons.net.ProtocolCommandSupport
All Implemented Interfaces:
Serializable
public class ProtocolCommandSupport
extends Object
implements Serializable
ProtocolCommandSupport is a convenience class for managing a list of
ProtocolCommandListeners and firing ProtocolCommandEvents. You can
simply delegate ProtocolCommandEvent firing and listener
registering/unregistering tasks to this class.
See Also:ProtocolCommandEvent,
ProtocolCommandListener,
Serialized Form
Constructor Summary
Constructors
Constructor and Description
ProtocolCommandSupport(Object source)
Creates a ProtocolCommandSupport instance using the indicated source
as the source of ProtocolCommandEvents.
Method Summary
Methods
Modifier and Type
Method and Description
void
addProtocolCommandListener(ProtocolCommandListener listener)
Adds a ProtocolCommandListener.
void
fireCommandSent(String command,
String message)
Fires a ProtocolCommandEvent signalling the sending of a command to all
registered listeners, invoking their
protocolCommandSent()
methods.
void
fireReplyReceived(int replyCode,
String message)
Fires a ProtocolCommandEvent signalling the reception of a command reply
to all registered listeners, invoking their
protocolReplyReceived()
methods.
int
getListenerCount()
Returns the number of ProtocolCommandListeners currently registered.
void
removeProtocolCommandListener(ProtocolCommandListener listener)
Removes a ProtocolCommandListener.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
ProtocolCommandSupport
public ProtocolCommandSupport(Object source)
Creates a ProtocolCommandSupport instance using the indicated source
as the source of ProtocolCommandEvents.
Parameters:source - The source to use for all generated ProtocolCommandEvents.
Method Detail
fireCommandSent
public void fireCommandSent(String command,
String message)
Fires a ProtocolCommandEvent signalling the sending of a command to all
registered listeners, invoking their
protocolCommandSent()
methods.
Parameters:command - The string representation of the command type sent, not
including the arguments (e.g., "STAT" or "GET").message - The entire command string verbatim as sent to the server,
including all arguments.
fireReplyReceived
public void fireReplyReceived(int replyCode,
String message)
Fires a ProtocolCommandEvent signalling the reception of a command reply
to all registered listeners, invoking their
protocolReplyReceived()
methods.
Parameters:replyCode - The integer code indicating the natureof the reply.
This will be the protocol integer value for protocols
that use integer reply codes, or the reply class constant
corresponding to the reply for protocols like POP3 that use
strings like OK rather than integer codes (i.e., POP3Repy.OK).message - The entire reply as received from the server.
addProtocolCommandListener
public void addProtocolCommandListener(ProtocolCommandListener listener)
Adds a ProtocolCommandListener.
Parameters:listener - The ProtocolCommandListener to add.
removeProtocolCommandListener
public void removeProtocolCommandListener(ProtocolCommandListener listener)
Removes a ProtocolCommandListener.
Parameters:listener - The ProtocolCommandListener to remove.
getListenerCount
public int getListenerCount()
Returns the number of ProtocolCommandListeners currently registered.
Returns:The number of ProtocolCommandListeners currently registered.
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Class
Next Class
Frames
No Frames
All Classes
Summary:
Nested |
Field |
Constr |
Method
Detail:
Field |
Constr |
Method
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.
Wyszukiwarka
Podobne podstrony:
rmi protocol7Voice Over Ip Protocols And Standards By Rakesh Arora (Voip)ProtocolExceptionprotocolInternet Protocol 3Mission Impossible Ghost Protocol 2011 720p BluRay x264 SPARKS (osloskop net)Cytotoxicity assay protocolAdresy IP (Internet Protocol)Internet Protocol wersja 6rmi protocol2rmi protocol609 optional Googles optimizations to network protocolsRS 422 RS 485 Communication protocol user s guide(1)annex vi ext of the Protocol of 1997 and Annex VI08 6 8 Transmission Control Protocol (TCP)X ProtocolCisco VLAN Trunking ProtocolTriage and transport protocolswięcej podobnych podstron