1 22 package org.jboss.mq.il.uil2; 23 24 import java.io.Serializable ; 25 26 import org.jboss.logging.Logger; 27 import org.jboss.mq.ReceiveRequest; 28 import org.jboss.mq.SpyDestination; 29 import org.jboss.mq.il.ClientIL; 30 import org.jboss.mq.il.uil2.msgs.MsgTypes; 31 import org.jboss.mq.il.uil2.msgs.DeleteTemporaryDestMsg; 32 import org.jboss.mq.il.uil2.msgs.PingMsg; 33 import org.jboss.mq.il.uil2.msgs.ReceiveRequestMsg; 34 35 41 public class UILClientIL 42 implements ClientIL, MsgTypes, Serializable 43 { 44 static final long serialVersionUID = -2667733986731260459L; 45 46 static Logger log = Logger.getLogger(UILClientIL.class); 47 48 private transient SocketManager socketMgr; 49 50 public void close() 51 throws Exception 52 { 53 if (socketMgr != null) 54 socketMgr.stop(); 55 } 56 57 public void deleteTemporaryDestination(SpyDestination dest) 58 throws Exception 59 { 60 DeleteTemporaryDestMsg msg = new DeleteTemporaryDestMsg(dest); 61 socketMgr.sendReply(msg); 62 } 63 64 public void pong(long serverTime) 65 throws Exception 66 { 67 PingMsg msg = new PingMsg(serverTime, false); 68 msg.getMsgID(); 69 socketMgr.sendReply(msg); 70 } 71 72 public void receive(ReceiveRequest messages[]) 73 throws Exception 74 { 75 ReceiveRequestMsg msg = new ReceiveRequestMsg(messages); 76 socketMgr.sendReply(msg); 78 } 79 80 protected void setSocketMgr(SocketManager socketMgr) 81 { 82 this.socketMgr = socketMgr; 83 } 84 } 85 | Popular Tags |