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.TopicConnection; 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 TopicTcpConnectionFactory 42 extends org.objectweb.joram.client.jms.TopicConnectionFactory 43 { 44 50 public TopicTcpConnectionFactory(String host, int port) 51 { 52 super(host, port); 53 } 54 55 58 public TopicTcpConnectionFactory() 59 {} 60 61 67 public javax.jms.TopicConnection 68 createTopicConnection(String name, String password) 69 throws javax.jms.JMSException { 70 return new TopicConnection(params, 71 new TcpConnection(params, 72 name, 73 password, 74 reliableClass)); 75 } 76 77 83 public javax.jms.Connection createConnection(String name, String password) 84 throws javax.jms.JMSException { 85 return new Connection(params, 86 new TcpConnection(params, 87 name, 88 password, 89 reliableClass)); 90 } 91 92 93 100 public static javax.jms.TopicConnectionFactory 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.TopicConnectionFactory 116 create(String host, 117 int port, 118 String reliableClass) { 119 TopicTcpConnectionFactory cf = new TopicTcpConnectionFactory(host, port); 120 cf.setReliableClass(reliableClass); 121 return cf; 122 } 123 124 130 public static javax.jms.TopicConnectionFactory create() 131 throws java.net.ConnectException 132 { 133 return create(AdminModule.getLocalHost(), AdminModule.getLocalPort()); 134 } 135 } 136 | Popular Tags |