KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ubermq > jms > client > PipeConnectionFactory


1 package com.ubermq.jms.client;
2
3 import com.ubermq.jms.client.impl.*;
4 import com.ubermq.jms.client.unicast.*;
5
6 import javax.jms.*;
7
8 /**
9  * Creates a pipe-based topic connection, connected to a particular
10  * in-process message server object.
11  */

12 public class PipeConnectionFactory
13     extends AbstractConnectionFactory
14     implements javax.jms.TopicConnectionFactory JavaDoc, javax.jms.QueueConnectionFactory JavaDoc
15 {
16     private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(PipeConnectionFactory.class);
17     private PipeEndpoint s;
18     
19     public PipeConnectionFactory(PipeEndpoint s)
20     {
21         this.s = s;
22     }
23     
24     public javax.jms.Connection JavaDoc createConnection()
25         throws JMSException
26     {
27         try
28         {
29             return new PipeConnection(s);
30         }
31         catch(Exception JavaDoc x)
32         {
33             log.error("", x);;
34             throw new JMSException(x.getMessage());
35         }
36     }
37 }
38
Popular Tags