1. /*
  2. * @(#)MessageHandler.java 1.6 04/06/21
  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.impl.protocol.giopmsgheaders;
  8. import java.io.IOException;
  9. /**
  10. * Interface which allows an implementation to use
  11. * double dispatch when processing the various
  12. * concrete message types found in this package.
  13. */
  14. public interface MessageHandler
  15. {
  16. //
  17. // REVISIT - These should not throw IOException.
  18. // Should be handled internally.
  19. /**
  20. * Used for message types for which we don't have concrete classes, yet,
  21. * such as CloseConnection and MessageError, as well as unknown types.
  22. */
  23. void handleInput(Message header) throws IOException;
  24. // Request
  25. void handleInput(RequestMessage_1_0 header) throws IOException;
  26. void handleInput(RequestMessage_1_1 header) throws IOException;
  27. void handleInput(RequestMessage_1_2 header) throws IOException;
  28. // Reply
  29. void handleInput(ReplyMessage_1_0 header) throws IOException;
  30. void handleInput(ReplyMessage_1_1 header) throws IOException;
  31. void handleInput(ReplyMessage_1_2 header) throws IOException;
  32. // LocateRequest
  33. void handleInput(LocateRequestMessage_1_0 header) throws IOException;
  34. void handleInput(LocateRequestMessage_1_1 header) throws IOException;
  35. void handleInput(LocateRequestMessage_1_2 header) throws IOException;
  36. // LocateReply
  37. void handleInput(LocateReplyMessage_1_0 header) throws IOException;
  38. void handleInput(LocateReplyMessage_1_1 header) throws IOException;
  39. void handleInput(LocateReplyMessage_1_2 header) throws IOException;
  40. // Fragment
  41. void handleInput(FragmentMessage_1_1 header) throws IOException;
  42. void handleInput(FragmentMessage_1_2 header) throws IOException;
  43. // CancelRequest
  44. void handleInput(CancelRequestMessage header) throws IOException;
  45. }