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 UnsubscribeMsg extends BaseMsg 33 { 34 private int subscriptionID; 35 36 public UnsubscribeMsg() 37 { 38 this(0); 39 } 40 public UnsubscribeMsg(int subscriptionID) 41 { 42 super(MsgTypes.m_unsubscribe); 43 this.subscriptionID = subscriptionID; 44 } 45 46 public int getSubscriptionID() 47 { 48 return subscriptionID; 49 } 50 51 public void write(ObjectOutputStream out) throws IOException 52 { 53 super.write(out); 54 out.writeInt(subscriptionID); 55 } 56 public void read(ObjectInputStream in) throws IOException , ClassNotFoundException 57 { 58 super.read(in); 59 subscriptionID = in.readInt(); 60 } 61 } 62 | Popular Tags |