You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

AntFrontEnd.java 3.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // -------------------------------------------------------------------------------
  2. // Copyright (c)2000 Apache Software Foundation
  3. // -------------------------------------------------------------------------------
  4. package org.apache.ant;
  5. /**
  6. * Abstract class that lets Ant talk to a front end such as a CLI front end,
  7. * GUI front end, Servlet front end, or some other front end.
  8. *
  9. * @author James Duncan Davidson (duncan@apache.org)
  10. */
  11. public abstract class AntFrontEnd {
  12. // -----------------------------------------------------------------
  13. // CONSTANTS
  14. // -----------------------------------------------------------------
  15. /**
  16. * Indicates that an associated message has a low importance.
  17. */
  18. public static final int MSG_LEVEL_LOW = 1;
  19. /**
  20. * Indicates that an associated message has a medium importance.
  21. */
  22. public static final int MSG_LEVEL_MED = 2;
  23. /**
  24. * Indicates that an associated message has a high importance.
  25. */
  26. public static final int MSG_LEVEL_HIGH = 3;
  27. // -----------------------------------------------------------------
  28. // PUBLIC METHODS
  29. // -----------------------------------------------------------------
  30. /**
  31. * Send notification to the FrontEnd that execution has moved into
  32. * the scope of a particular project. The default implementation
  33. * does nothing.
  34. */
  35. public void notifyProjectStart(Project project) {
  36. }
  37. /**
  38. * Send notification to the FrontEnd that execution has moved out
  39. * of the scope of a particular Project. The default implementation
  40. * does nothing.
  41. */
  42. public void notifyProjectEnd(Project project) {
  43. }
  44. /**
  45. * Send notification to the FrontEnd that execution has moved into
  46. * the scope of a particular target. The default implementation does
  47. * nothing.
  48. */
  49. public void notifyTargetStart(Target target) {
  50. }
  51. /**
  52. * Send notification to the FrontEnd that execution has moved out of
  53. * the scope of a particular target. The default implementation does
  54. * nothing.
  55. */
  56. public void notifyTargetEnd(Target target) {
  57. }
  58. /**
  59. * Send notification to the FrontEnd that execution has moved into the
  60. * scope of a particular task. The default implementation does nothing.
  61. */
  62. public void notifyTaskStart(Task task) {
  63. }
  64. /**
  65. * Send notification to the FrontEnd that execution has moved out of
  66. * the scope of a particular task. The default implementation does
  67. * nothing.
  68. */
  69. public void notifyTaskEnd(Task task) {
  70. }
  71. /**
  72. * Writes a message to the front end with a medium importance.
  73. */
  74. public void writeMessage(String message) {
  75. writeMessage(message, MSG_LEVEL_MED);
  76. }
  77. /**
  78. * Writes a message to the front end.
  79. */
  80. public abstract void writeMessage(String message, int level);
  81. }