1 22 package org.jboss.test.cluster.partition; 23 24 import java.io.Serializable ; 25 26 import org.jboss.ha.framework.interfaces.HAPartition.HAPartitionStateTransfer; 27 28 36 public class BadHAPartitionStateTransfer 37 extends AbstractHAPartitionStateTransfer 38 implements HAPartitionStateTransfer, BadHAPartitionStateTransferMBean 39 { 40 private boolean returnState; 41 42 public Serializable getCurrentState() 43 { 44 if (returnState) 45 return new BadHAPartitionState(); 46 47 throw new BadHAPartitionStateException("Configured not to return state"); 48 } 49 50 public void setCurrentState(Serializable newState) 51 { 52 } 54 55 public boolean getReturnState() 56 { 57 return returnState; 58 } 59 60 public void setReturnState(boolean returnState) 61 { 62 this.returnState = returnState; 63 } 64 65 66 67 } 68 | Popular Tags |