KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > jms > client > p2p > P2PProducerDelegate


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.p2p;
8
9 import javax.jms.Destination JavaDoc;
10 import javax.jms.JMSException JavaDoc;
11 import javax.jms.Message JavaDoc;
12
13 import org.jboss.jms.MessageImpl;
14 import org.jboss.jms.client.ProducerDelegate;
15 import org.jboss.jms.message.JBossMessage;
16
17 /**
18  * The p2p producer
19  *
20  * @author <a HREF="mailto:nathan@jboss.org">Nathan Phelps</a>
21  * @author <a HREF="mailto:adrian@jboss.org>Adrian Brock</a>
22  * @version $Revision: 1.2 $
23  */

24 public class P2PProducerDelegate
25    implements ProducerDelegate
26 {
27    // Constants -----------------------------------------------------
28

29    // Attributes ----------------------------------------------------
30

31    private P2PSessionDelegate session = null;
32
33    // Static --------------------------------------------------------
34

35    // Constructors --------------------------------------------------
36

37    public P2PProducerDelegate(P2PSessionDelegate session, Destination JavaDoc destination)
38       throws JMSException JavaDoc
39    {
40       this.session = session;
41    }
42
43    // Public --------------------------------------------------------
44

45    // ProducerDelegate implementation -------------------------------
46

47     public void close() throws JMSException JavaDoc
48     {
49     }
50
51     public void closing() throws JMSException JavaDoc
52     {
53     }
54
55    public void send(Message JavaDoc message)
56       throws JMSException JavaDoc
57    {
58       this.session.send((MessageImpl) ((MessageImpl) message).clone());
59    }
60
61    public JBossMessage encapsulateMessage(Message JavaDoc message)
62    {
63       // TODO encapsulateMessage
64
return null;
65    }
66
67    // Protected ------------------------------------------------------
68

69    // Package Private ------------------------------------------------
70

71    // Private --------------------------------------------------------
72

73    // Inner Classes --------------------------------------------------
74

75 }
76
Popular Tags