KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > ws > rm > persistence > RMStore


1 package org.objectweb.celtix.ws.rm.persistence;
2
3 import java.math.BigInteger JavaDoc;
4 import java.util.Collection JavaDoc;
5 import java.util.Map JavaDoc;
6
7 import org.objectweb.celtix.ws.rm.Identifier;
8
9
10 public interface RMStore {
11    
12     /**
13      * Initialises the store.
14      * @param params the store initialisation parameters
15      */

16     void init(Map JavaDoc<String JavaDoc, String JavaDoc> params);
17     
18     /**
19      * Create a source sequence in the persistent store, with the sequence attributes as specified in the
20      * <code>RMSourceSequence</code> object.
21      * @param seq the sequence
22      */

23     void createSourceSequence(RMSourceSequence seq);
24     
25     /**
26      * Create a destination sequence in the persistent store, with the sequence attributes as specified in the
27      * <code>RMSDestinationSequence</code> object.
28      * @param seq the sequence
29      */

30     void createDestinationSequence(RMDestinationSequence seq);
31     
32     /**
33      * Remove the source sequence with the specified identifier from persistent store.
34      * @param seq the sequence
35      */

36     void removeSourceSequence(Identifier seq);
37     
38     /**
39      * Remove the destination sequence with the specified identifier from persistent store.
40      * @param seq the sequence
41      */

42     void removeDestinationSequence(Identifier seq);
43     
44     /**
45      * Retrieves all sequences managed by the identified RM source endpoint
46      * from persistent store.
47      *
48      * @param endpointIdentifier the identifier for the source
49      * @return the collection of sequences
50      */

51     Collection JavaDoc<RMSourceSequence> getSourceSequences(String JavaDoc endpointIdentifier);
52     
53     /**
54      * Retrieves all sequences managed by the identified RM destination endpoint
55      * from persistent store.
56      *
57      * @param endpointIdentifier the identifier for the destination
58      * @return the collection of sequences
59      */

60     Collection JavaDoc<RMDestinationSequence> getDestinationSequences(String JavaDoc endpointIdentifier);
61     
62     /**
63      * Retrieves the outbound/inbound messages stored for the source/destination sequence with
64      * the given identifier.
65      * @param sid the source sequence identifier
66      * @param outbound true if the message is outbound
67      * @return the collection of messages
68      * *
69      */

70     Collection JavaDoc<RMMessage> getMessages(Identifier sid, boolean outbound);
71     
72     /**
73      * Called by an RM source upon processing an outbound message. The <code>RMMessage</code>
74      * parameter is null for non application (RM protocol) messages.
75      *
76      * @param seq the source sequence
77      * @param msg the outgoing message
78      */

79     void persistOutgoing(RMSourceSequence seq, RMMessage msg);
80     
81    /**
82     * Called by an RM source upon processing an outbound message. The <code>RMMessage</code>
83      * parameter is null for non application (RM protocol) messages.
84      *
85     * @param seq the destination sequence
86     * @param msg the incoming message
87     */

88     void persistIncoming(RMDestinationSequence seq, RMMessage msg);
89   
90     /**
91      * Removes the messages with the given message numbers and identifiers from the store of
92      * outbound/inbound messages.
93      *
94      * @param sid the identifier of the source sequence
95      * @param messageNr the collection of message numbers
96      * @param outbound true if the message is outbound
97      */

98     void removeMessages(Identifier sid, Collection JavaDoc<BigInteger JavaDoc> messageNrs, boolean outbound);
99 }
100
Popular Tags