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 import javax.jms.Destination ; 29 import javax.jms.TemporaryQueue ; 30 import javax.jms.TemporaryTopic ; 31 32 36 public class TemporaryDestMsg extends BaseMsg 37 { 38 private Destination dest; 39 40 public TemporaryDestMsg(boolean isQueue) 41 { 42 super(isQueue ? MsgTypes.m_getTemporaryQueue : MsgTypes.m_getTemporaryTopic); 43 } 44 45 public TemporaryQueue getQueue() 46 { 47 return (TemporaryQueue ) dest; 48 } 49 public TemporaryTopic getTopic() 50 { 51 return (TemporaryTopic ) dest; 52 } 53 public void setDest(Destination dest) 54 { 55 this.dest = dest; 56 } 57 58 public void write(ObjectOutputStream out) throws IOException 59 { 60 super.write(out); 61 out.writeObject(dest); 62 } 63 public void read(ObjectInputStream in) throws IOException , ClassNotFoundException 64 { 65 super.read(in); 66 dest = (Destination ) in.readObject(); 67 } 68 } 69 | Popular Tags |