/*** * Fires a ProtocolCommandEvent signalling the sending of a command to all * registered listeners, invoking their * {@link org.apache.commons.net.ProtocolCommandListener#protocolCommandSent protocolCommandSent() } * methods. * * @param command The string representation of the command type sent, not * including the arguments (e.g., "STAT" or "GET"). * @param message The entire command string verbatim as sent to the server, * including all arguments. ***/ public void fireCommandSent(String command, String message) { ProtocolCommandEvent event; event = new ProtocolCommandEvent(__source, command, message); for (EventListener listener : __listeners) { ((ProtocolCommandListener)listener).protocolCommandSent(event); } }
/*** * Fires a ProtocolCommandEvent signalling the reception of a command reply * to all registered listeners, invoking their * {@link org.apache.commons.net.ProtocolCommandListener#protocolReplyReceived protocolReplyReceived() } * methods. * * @param 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). * @param message The entire reply as received from the server. ***/ public void fireReplyReceived(int replyCode, String message) { ProtocolCommandEvent event; event = new ProtocolCommandEvent(__source, replyCode, message); for (EventListener listener : __listeners) { ((ProtocolCommandListener)listener).protocolReplyReceived(event); } }
/*** * Fires a ProtocolCommandEvent signalling the sending of a command to all * registered listeners, invoking their * {@link org.apache.commons.net.ProtocolCommandListener#protocolCommandSent protocolCommandSent() } * methods. * <p> * @param command The string representation of the command type sent, not * including the arguments (e.g., "STAT" or "GET"). * @param message The entire command string verbatim as sent to the server, * including all arguments. ***/ public void fireCommandSent(String command, String message) { ProtocolCommandEvent event; event = new ProtocolCommandEvent(__source, command, message); for (EventListener listener : __listeners) { ((ProtocolCommandListener)listener).protocolCommandSent(event); } }
/*** * Fires a ProtocolCommandEvent signalling the reception of a command reply * to all registered listeners, invoking their * {@link org.apache.commons.net.ProtocolCommandListener#protocolReplyReceived protocolReplyReceived() } * methods. * <p> * @param 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). * @param message The entire reply as received from the server. ***/ public void fireReplyReceived(int replyCode, String message) { ProtocolCommandEvent event; event = new ProtocolCommandEvent(__source, replyCode, message); for (EventListener listener : __listeners) { ((ProtocolCommandListener)listener).protocolReplyReceived(event); } }
/*** * Fires a ProtocolCommandEvent signalling the reception of a command reply * to all registered listeners, invoking their * {@link org.apache.commons.net.ProtocolCommandListener#protocolReplyReceived protocolReplyReceived() } * methods. * <p> * @param 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). * @param message The entire reply as received from the server. ***/ public void fireReplyReceived(int replyCode, String message) { Enumeration en; ProtocolCommandEvent event; ProtocolCommandListener listener; en = __listeners.getListeners(); event = new ProtocolCommandEvent(__source, replyCode, message); while (en.hasMoreElements()) { listener = (ProtocolCommandListener)en.nextElement(); listener.protocolReplyReceived(event); } }
/*** * Fires a ProtocolCommandEvent signalling the sending of a command to all * registered listeners, invoking their * {@link org.apache.commons.net.ProtocolCommandListener#protocolCommandSent protocolCommandSent() } * methods. * <p> * @param command The string representation of the command type sent, not * including the arguments (e.g., "STAT" or "GET"). * @param message The entire command string verbatim as sent to the server, * including all arguments. ***/ public void fireCommandSent(String command, String message) { Enumeration en; ProtocolCommandEvent event; ProtocolCommandListener listener; en = __listeners.getListeners(); event = new ProtocolCommandEvent(__source, command, message); while (en.hasMoreElements()) { listener = (ProtocolCommandListener)en.nextElement(); listener.protocolCommandSent(event); } }