KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > jms > client > standard > StandardImplementation


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.jms.client.standard;
8
9 import javax.jms.JMSException JavaDoc;
10 import javax.naming.NamingException JavaDoc;
11 import javax.naming.Reference JavaDoc;
12 import javax.naming.StringRefAddr JavaDoc;
13
14 import org.jboss.jms.client.ConnectionDelegate;
15 import org.jboss.jms.client.ImplementationDelegate;
16 import org.jboss.jms.client.JBossConnectionFactory;
17 import org.jboss.remoting.Client;
18
19 /**
20  * The standard implementation
21  *
22  * @author <a HREF="mailto:adrian@jboss.org>Adrian Brock</a>
23  * @version $Revision: 1.2 $
24  */

25 public class StandardImplementation
26    implements ImplementationDelegate
27 {
28    // Constants -----------------------------------------------------
29

30    // Attributes ----------------------------------------------------
31

32    // Static --------------------------------------------------------
33

34    /** The invoker locator */
35    private Client client;
36
37    // Constructors --------------------------------------------------
38

39    public StandardImplementation(Client client)
40       throws JMSException JavaDoc
41    {
42       this.client = client;
43    }
44
45    // Public --------------------------------------------------------
46

47    // ImplementationDelegate implementation -------------------------
48

49    public ConnectionDelegate createConnection(String JavaDoc userName, String JavaDoc password) throws JMSException JavaDoc
50    {
51       //TODO createConnection
52
return null;
53    }
54
55    public Reference JavaDoc getReference() throws NamingException JavaDoc
56    {
57       return new Reference JavaDoc
58       (
59          JBossConnectionFactory.class.getName(),
60          new StringRefAddr JavaDoc("locatorURI", client.getInvoker().getLocator().getLocatorURI()),
61          StandardImplementationFactory.class.getName(),
62          null
63       );
64    }
65
66    // Protected ------------------------------------------------------
67

68    // Package Private ------------------------------------------------
69

70    // Private --------------------------------------------------------
71

72    // Inner Classes --------------------------------------------------
73

74 }
75
Popular Tags