1 3 package org.jgroups.tests; 4 5 6 import org.jgroups.Address; 7 import org.jgroups.Header; 8 import org.jgroups.ViewId; 9 10 import java.io.IOException ; 11 import java.io.ObjectInput ; 12 import java.io.ObjectOutput ; 13 import java.util.Vector ; 14 15 16 17 public class EncryptOrderTestHeader extends Header { 18 19 20 long seqno=-1; 22 23 24 public EncryptOrderTestHeader() {} 25 26 27 28 public EncryptOrderTestHeader(long seqno) { 29 30 this.seqno=seqno; 31 } 32 33 34 public long size() { 35 return 512; 36 } 37 38 39 public void writeExternal(ObjectOutput out) throws IOException { 40 41 out.writeLong(seqno); 42 } 43 44 45 46 public void readExternal(ObjectInput in) throws IOException , ClassNotFoundException { 47 48 seqno=in.readLong(); 49 50 } 51 52 53 public EncryptOrderTestHeader copy() { 54 EncryptOrderTestHeader ret=new EncryptOrderTestHeader(seqno); 55 return ret; 56 } 57 58 59 60 61 public String toString() { 62 StringBuffer ret=new StringBuffer (); 63 ret.append("[ENCRYPT_ORDER_TEST: seqno=" + seqno); 64 ret.append(']'); 65 66 return ret.toString(); 67 } 68 69 } 70 | Popular Tags |