1 24 25 package org.objectweb.tribe.messages; 26 27 35 public class FragmentedMessage extends ByteMessage 36 { 37 38 private String messageId; 39 private int size; 40 private int fragmentId; 41 42 47 public FragmentedMessage(int messageSize) 48 { 49 super(null); 50 this.messageId = toString(); this.size = messageSize; 52 this.fragmentId = 0; 53 } 54 55 60 public byte[] getFragmentData() 61 { 62 return getContent(); 63 } 64 65 70 public int getFragmentId() 71 { 72 return fragmentId; 73 } 74 75 80 public String getMessageId() 81 { 82 return messageId; 83 } 84 85 90 public int getMessageSize() 91 { 92 return size; 93 } 94 95 101 public void setFragment(int fragmentId, byte[] buf) 102 { 103 this.fragmentId = fragmentId; 104 setContent(buf); 105 } 106 107 } | Popular Tags |