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

Condition.java 1.1KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* -*- Mode: Java; -*-
  2. Copyright (c) Xerox Corporation 1998-2002. All rights reserved.
  3. Use and copying of this software and preparation of derivative works based
  4. upon this software are permitted. Any distribution of this software or
  5. derivative works must comply with all applicable United States export control
  6. laws.
  7. This software is made available AS IS, and Xerox Corporation makes no warranty
  8. about the software, its performance or its conformity to any specification.
  9. |<--- this code is formatted to fit into 80 columns --->|
  10. |<--- this code is formatted to fit into 80 columns --->|
  11. |<--- this code is formatted to fit into 80 columns --->|
  12. */
  13. package coordination;
  14. /**
  15. * Interface for pre-conditions that are passed to guardedEntry methods of
  16. * Coordinator.
  17. * Conditions should be passed as anonymous classes that simply implement
  18. * the checkit method.
  19. *
  20. */
  21. public interface Condition {
  22. /**
  23. * This method is called automatically by Coordinator.guardedEntry(...)
  24. * and it's called everytime the coordination state changes.
  25. */
  26. public boolean checkit();
  27. }