KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ubermq > jms > common > datagram > IAckDatagramFactory


1 package com.ubermq.jms.common.datagram;
2
3
4 /**
5  * A factory interface for creating acknowledgement messages, both
6  * positive and negative.
7  */

8 public interface IAckDatagramFactory
9 {
10     /**
11      * Creates an acknowledgement datagram with no contextual information.
12      * This creates a positive ack.
13      */

14     public IAckDatagram ack();
15     
16     /**
17      * Creates an acknowledgement datagram for the given message identifier.
18      * This creates a positive ack.
19      * @param id a message identifier
20      */

21     public IAckDatagram ack(MessageId id);
22     
23     /**
24      * Creates a negative acknowledgement (NACK) datagram
25      * with no contextual information.
26      */

27     public IAckDatagram nack();
28     
29     /**
30      * Creates a negative acknowledgement (NACK) datagram in reference
31      * to the specified message identifier.
32      * @param id a message identifier
33      */

34     public IAckDatagram nack(MessageId id);
35 }
36
Popular Tags