1. /*
  2. * @(#)BufferManagerRead.java 1.13 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.iiop;
  8. import com.sun.corba.se.internal.iiop.ByteBufferWithInfo;
  9. import com.sun.corba.se.internal.iiop.IIOPInputStream;
  10. import com.sun.corba.se.internal.iiop.Connection;
  11. import com.sun.corba.se.internal.iiop.messages.FragmentMessage;
  12. import com.sun.corba.se.internal.iiop.messages.Message;
  13. public interface BufferManagerRead
  14. {
  15. /**
  16. * Case: Called from ReaderThread on complete message or fragments.
  17. * The given buf may be entire message or a fragment.
  18. *
  19. * The ReaderThread finds the ReadBufferManager instance either in
  20. * in a fragment map (when collecting - GIOP 1.2 phase 1) or
  21. * in an active server requests map (when streaming - GIOP 1.2 phase 2).
  22. *
  23. * As a model for implementation see IIOPInputStream's
  24. * constructor of the same name. There are going to be some variations.
  25. *
  26. */
  27. public void processFragment (byte[] buf, FragmentMessage header);
  28. /**
  29. * Case: called from CDRInputStream constructor before unmarshaling.
  30. *
  31. * Does:
  32. *
  33. * this.bufQ.get()
  34. *
  35. * If streaming then sync on bufQ and wait if empty.
  36. */
  37. /**
  38. * Case: called from CDRInputStream.grow.
  39. *
  40. * Does:
  41. *
  42. * this.bufQ.get()
  43. *
  44. * If streaming then sync on bufQ and wait if empty.
  45. */
  46. public ByteBufferWithInfo underflow (ByteBufferWithInfo bbwi);
  47. /**
  48. * Called once after creating this buffer manager and before
  49. * it begins processing.
  50. */
  51. public void init(Message header);
  52. /**
  53. * Returns the mark/reset handler for this stream.
  54. */
  55. public MarkAndResetHandler getMarkAndResetHandler();
  56. /*
  57. * Signals that the processing be cancelled.
  58. */
  59. public void cancelProcessing(int requestId);
  60. }