1. /*
  2. * @(#)FragmentMessage_1_1.java 1.10 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. /**
  9. * This implements the GIOP 1.1 Fragment header.
  10. *
  11. * @author Ram Jeyaraman 05/14/2000
  12. * @version 1.0
  13. */
  14. public final class FragmentMessage_1_1 extends Message_1_1
  15. implements FragmentMessage {
  16. // Constructors
  17. FragmentMessage_1_1() {}
  18. FragmentMessage_1_1(Message_1_1 msg11) {
  19. this.magic = msg11.magic;
  20. this.GIOP_version = msg11.GIOP_version;
  21. this.flags = msg11.flags;
  22. this.message_type = GIOPFragment;
  23. this.message_size = 0;
  24. }
  25. // Accessor methods
  26. public int getRequestId() {
  27. return -1; // 1.1 has no fragment header and so no request_id
  28. }
  29. public int getHeaderLength() {
  30. return GIOPMessageHeaderLength;
  31. }
  32. // IO methods
  33. /* This will never be called, since we do not currently read the
  34. * request_id from an CDRInputStream. Instead we use the
  35. * readGIOP_1_1_requestId to read the requestId from a byte buffer.
  36. */
  37. public void read(org.omg.CORBA.portable.InputStream istream) {
  38. super.read(istream);
  39. }
  40. /* 1.1 has no request_id; so nothing to write */
  41. public void write(org.omg.CORBA.portable.OutputStream ostream) {
  42. super.write(ostream);
  43. }
  44. public void callback(MessageHandler handler)
  45. throws java.io.IOException
  46. {
  47. handler.handleInput(this);
  48. }
  49. } // class FragmentMessage_1_1