1 25 package org.objectweb.joram.client.jms.tcp; 26 27 import org.objectweb.joram.client.jms.Connection; 28 import org.objectweb.joram.client.jms.FactoryParameters; 29 import org.objectweb.joram.client.jms.QueueConnection; 30 import org.objectweb.joram.client.jms.admin.AdminModule; 31 32 import java.util.Vector ; 33 34 import javax.naming.NamingException ; 35 36 37 41 public class QueueTcpConnectionFactory 42 extends org.objectweb.joram.client.jms.QueueConnectionFactory 43 { 44 50 public QueueTcpConnectionFactory(String host, int port) 51 { 52 super(host, port); 53 } 54 55 58 public QueueTcpConnectionFactory() 59 {} 60 61 62 68 public javax.jms.QueueConnection 69 createQueueConnection(String name, String password) 70 throws javax.jms.JMSException { 71 return new QueueConnection(params, 72 new TcpConnection(params, 73 name, 74 password, 75 reliableClass)); 76 } 77 78 84 public javax.jms.Connection createConnection(String name, String password) 85 throws javax.jms.JMSException { 86 return new Connection(params, 87 new TcpConnection(params, 88 name, 89 password, 90 reliableClass)); 91 } 92 93 100 public static javax.jms.QueueConnectionFactory 101 create(String host, int port) { 102 return create(host, 103 port, 104 "org.objectweb.joram.client.jms.tcp.ReliableTcpClient"); 105 } 106 107 115 public static javax.jms.QueueConnectionFactory 116 create(String host, 117 int port, 118 String reliableClass) { 119 QueueTcpConnectionFactory cf = new QueueTcpConnectionFactory(host, port); 120 cf.setReliableClass(reliableClass); 121 return cf; 122 } 123 124 130 public static javax.jms.QueueConnectionFactory create() 131 throws java.net.ConnectException 132 { 133 return create(AdminModule.getLocalHost(), AdminModule.getLocalPort()); 134 } 135 } 136 | Popular Tags |