1 22 package org.jboss.aspects.remoting; 23 24 import org.jboss.ha.framework.interfaces.ClusteringTargetsRepository; 25 import org.jboss.ha.framework.interfaces.FamilyClusterInfo; 26 27 import java.io.IOException ; 28 import java.util.List ; 29 34 public class FamilyWrapper implements java.io.Externalizable 35 { 36 private static final long serialVersionUID = 3880844152274576311L; 37 38 private FamilyClusterInfo info; 39 40 public FamilyWrapper() {} 41 42 public FamilyWrapper(String proxyFamilyName, List targets) 43 { 44 info = ClusteringTargetsRepository.initTarget(proxyFamilyName, targets); 45 } 46 47 public FamilyClusterInfo get() { return info; } 48 49 public void writeExternal(final java.io.ObjectOutput out) 50 throws IOException 51 { 52 out.writeObject(info.getFamilyName()); 53 out.writeObject(info.getTargets()); 54 } 55 56 61 public void readExternal(final java.io.ObjectInput in) 62 throws IOException , ClassNotFoundException 63 { 64 String proxyFamilyName = (String )in.readObject(); 65 List targets = (List )in.readObject(); 66 this.info = ClusteringTargetsRepository.initTarget(proxyFamilyName, targets); 69 } 70 71 } 72 | Popular Tags |