1 22 package org.jboss.mq.il.uil2.msgs; 23 24 import java.io.IOException ; 25 import java.io.ObjectInputStream ; 26 import java.io.ObjectOutputStream ; 27 28 32 public class EnableConnectionMsg extends BaseMsg 33 { 34 private boolean enabled; 35 36 public EnableConnectionMsg() 37 { 38 this(false); 39 } 40 public EnableConnectionMsg(boolean enabled) 41 { 42 super(MsgTypes.m_setEnabled); 43 this.enabled = enabled; 44 } 45 46 public boolean isEnabled() 47 { 48 return enabled; 49 } 50 51 public void write(ObjectOutputStream out) throws IOException 52 { 53 super.write(out); 54 out.writeBoolean(enabled); 55 } 56 public void read(ObjectInputStream in) throws IOException , ClassNotFoundException 57 { 58 super.read(in); 59 enabled = in.readBoolean(); 60 } 61 } 62 | Popular Tags |