1. /*
  2. * Copyright 2001-2004 The Apache Software Foundation
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package org.apache.commons.net;
  17. import java.util.EventListener;
  18. /***
  19. * There exists a large class of IETF protocols that work by sending an
  20. * ASCII text command and arguments to a server, and then receiving an
  21. * ASCII text reply. For debugging and other purposes, it is extremely
  22. * useful to log or keep track of the contents of the protocol messages.
  23. * The ProtocolCommandListener interface coupled with the
  24. * <a href="org.apache.commons.net.ProtocolCommandEvent.html"> ProtocolCommandEvent
  25. * </a> class facilitate this process.
  26. * <p>
  27. * To receive ProtocolCommandEvents, you merely implement the
  28. * ProtocolCommandListener interface and register the class as a listener
  29. * with a ProtocolCommandEvent source such as
  30. * <a href="org.apache.commons.net.ftp.FTPClient.html"> FTPClient </a>.
  31. * <p>
  32. * <p>
  33. * @see ProtocolCommandEvent
  34. * @see ProtocolCommandSupport
  35. * @author Daniel F. Savarese
  36. ***/
  37. public interface ProtocolCommandListener extends EventListener
  38. {
  39. /***
  40. * This method is invoked by a ProtocolCommandEvent source after
  41. * sending a protocol command to a server.
  42. * <p>
  43. * @param event The ProtocolCommandEvent fired.
  44. ***/
  45. public void protocolCommandSent(ProtocolCommandEvent event);
  46. /***
  47. * This method is invoked by a ProtocolCommandEvent source after
  48. * receiving a reply from a server.
  49. * <p>
  50. * @param event The ProtocolCommandEvent fired.
  51. ***/
  52. public void protocolReplyReceived(ProtocolCommandEvent event);
  53. }