1. /*
  2. * @(#)Work.java 1.3 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.internal.orbutil;
  8. /**
  9. * Defines the methods necessary for a subclass to
  10. * be processed by a thread in a ThreadPool. Implementing
  11. * classes define the actual work to do.
  12. */
  13. public interface Work
  14. {
  15. /**
  16. * Get the name for this type of work. The thread that
  17. * does this type of Work will set it's name to what is
  18. * returned by this method. This is only useful for
  19. * debugging (so you can easily see what type of thread
  20. * it is).
  21. */
  22. String getName();
  23. /**
  24. * Do the actual work. This should perform all its own
  25. * error handling. Any Exceptions that escape will be
  26. * ignored.
  27. */
  28. void process();
  29. }