1. /*
  2. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package com.sun.corba.se.spi.orbutil.threadpool;
  6. public interface ThreadPoolChooser
  7. {
  8. /**
  9. * This method is used to return an instance of ThreadPool based on the
  10. * strategy/policy implemented in the ThreadPoolChooser from the set of
  11. * ThreadPools allowed to be used by the ORB. Typically, the set of
  12. * ThreadPools would be specified by passing the threadpool-ids
  13. * configured in the ORB element of the domain.xml of the appserver.
  14. */
  15. public ThreadPool getThreadPool();
  16. /**
  17. * This method is used to return an instance of ThreadPool that is obtained
  18. * by using the id argument passed to it. This method will be used in
  19. * situations where the threadpool id is known to the caller e.g. by the
  20. * connection object or looking at the high order bits of the request id
  21. */
  22. public ThreadPool getThreadPool(int id);
  23. /**
  24. * This method is a convenience method to see what threadpool-ids are being
  25. * used by the ThreadPoolChooser
  26. */
  27. public String[] getThreadPoolIds();
  28. }