1. /*
  2. * @(#)ContactInfoListIterator.java 1.10 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.pept.transport;
  8. import java.util.Iterator;
  9. /**
  10. * <code>ContactInfoIterator</code> is used to retrieve individual
  11. * {@link com.sun.corba.se.pept.transport.ContactInfo ContactInfo}.
  12. *
  13. * @author Harold Carr
  14. */
  15. public interface ContactInfoListIterator
  16. extends
  17. Iterator
  18. {
  19. /**
  20. * The underlying list for this iterator.
  21. *
  22. * @return The underlying list for this iterator.
  23. */
  24. public ContactInfoList getContactInfoList();
  25. /**
  26. * Used to report information to the iterator to be used
  27. * in future invocations.
  28. *
  29. * @param contactInfo The
  30. * {@link com.sun.corba.se.pept.transport.ContactInfo ContactInfo}
  31. * obtained from this iterator which resulted in a successful invocation.
  32. */
  33. public void reportSuccess(ContactInfo contactInfo);
  34. /**
  35. * Used to report information to the iterator to be used
  36. * in future invocations.
  37. *
  38. * @param contactInfo The
  39. * {@link com.sun.corba.se.pept.transport.ContactInfo ContactInfo}
  40. * in effect when an invocation exception occurs.
  41. * @param exception The
  42. * {@link java.lang.RuntimeException RuntimeException}.
  43. *
  44. * @return Returns true if the request should be retried.
  45. */
  46. public boolean reportException(ContactInfo contactInfo,
  47. RuntimeException exception);
  48. /**
  49. * The exception to report to the presentation block.
  50. *
  51. * @return If the iterator reaches the end before the invocation
  52. * is successful one returns this exception (previously reported to
  53. * the iterator via {@link #reportException}).
  54. */
  55. public RuntimeException getFailureException();
  56. }
  57. // End of file.