1 3 package org.jgroups.protocols; 4 5 import org.jgroups.Header; 6 7 import java.io.IOException ; 8 import java.io.ObjectInput ; 9 import java.io.ObjectOutput ; 10 11 12 13 14 public class TunnelHeader extends Header { 15 public String channel_name=null; 16 17 public TunnelHeader() {} 19 public TunnelHeader(String n) {channel_name=n;} 20 21 public long size() { 22 return 100; 23 } 24 25 public String toString() { 26 return "[TUNNEL:channel_name=" + channel_name + ']'; 27 } 28 29 30 public void writeExternal(ObjectOutput out) throws IOException { 31 out.writeObject(channel_name); 32 } 33 34 35 36 public void readExternal(ObjectInput in) throws IOException , ClassNotFoundException { 37 channel_name=(String )in.readObject(); 38 } 39 40 41 } 42 | Popular Tags |