KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ubermq > jms > client > impl > NullDeliveryManager


1 package com.ubermq.jms.client.impl;
2
3 import com.ubermq.jms.client.*;
4 import com.ubermq.kernel.*;
5 import java.util.*;
6 import javax.jms.Message JavaDoc;
7 import EDU.oswego.cs.dl.util.concurrent.*;
8
9 /**
10  * Passes through all messages in the order in which they were
11  * received, regardless of sender ID or
12  * sequence number.
13  */

14 public final class NullDeliveryManager
15     implements IDeliveryManager
16 {
17
18     /**
19      * request delivery of the message at some time in the future.
20      * at this point, the caller can forget about the message and
21      * assume the message sender specified may be called back
22      * at some future time. It is up to the implementation whether
23      * the object will be called back at all.
24      */

25     public void deliver(long senderId,
26                         long sequence,
27                         Message JavaDoc msg,
28                         IMessageSender s)
29     {
30         s.sendMessage(msg);
31     }
32
33     /**
34      * makes a new instance of the delivery manager for a new spawned connection
35      */

36     public IDeliveryManager newInstance()
37     {
38         return this;
39     }
40
41
42 }
43
Popular Tags