1 24 36 37 package org.datashare.objects; 38 39 import java.util.Date ; 40 41 48 public class DataShareObject implements java.io.Serializable 49 { 50 53 static final long serialVersionUID = 9030536576476457607L; 54 55 public int type; 56 public static final int SENDTOOTHERS = 0; 57 public static final int SENDTOALL = 1; 58 public static final int SENDTOCLIENT = 2; 59 public static final int KEEPALIVE = 9999; 61 64 private Date date; 65 66 69 public byte[] objectBytes = null; 70 71 74 public String sendingClientKey = null; 75 76 79 public String destinationClientKey = null; 80 81 85 public boolean isControlObject = false; 86 87 91 public boolean isFromHistory = false; 92 93 97 public DataShareObject() 98 { 99 date = new Date (); type = KEEPALIVE; 101 } 102 103 106 public DataShareObject(byte[] objectBytes, 107 String sendingClientKey, 109 String destinationClientKey) 110 { 111 this(); this.objectBytes = objectBytes; 113 this.type = this.SENDTOCLIENT; this.sendingClientKey = sendingClientKey; 115 this.destinationClientKey = destinationClientKey; 116 } 117 118 121 public DataShareObject(byte[] objectBytes, 122 int type, 123 String sendingClientKey) 124 { 125 this(); this.objectBytes = objectBytes; 127 this.type = type; this.sendingClientKey = sendingClientKey; 129 } 130 131 134 public Date 135 getCreationDate() 136 { 137 return date; 138 } 139 140 } 141 | Popular Tags |