/*** * 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 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 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); } }