View Javadoc

1   /*
2    * Copyright (c) 1998-2002 The Jgroup Team.
3    *
4    * This program is free software; you can redistribute it and/or modify
5    * it under the terms of the GNU Lesser General Public License version 2 as
6    * published by the Free Software Foundation.
7    *
8    * This program is distributed in the hope that it will be useful,
9    * but WITHOUT ANY WARRANTY; without even the implied warranty of
10   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11   * GNU Lesser General Public License for more details.
12   *
13   * You should have received a copy of the GNU Lesser General Public License
14   * along with this program; if not, write to the Free Software
15   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16   *
17   */
18  
19  package jgroup.relacs.daemon;
20  
21  /**
22   * The <code> Tag</code> interface contains the tags internally used by daemons
23   * and members to communicate.
24   *
25   * @author  Alberto Montresor
26   * @since   Jgroup 0.1
27   */
28  interface Tag
29  {
30  
31    ////////////////////////////////////////////////////////////////////////////////////////////
32    // Status tags
33    ////////////////////////////////////////////////////////////////////////////////////////////
34  
35    static final int S_IDLE       = 1;    // Idle phase
36    static final int S_SYNCH      = 2;    // Synchronization phase
37    static final int S_ESTIMATE   = 3;    // Estimate exchange phase
38  
39    ////////////////////////////////////////////////////////////////////////////////////////////
40    // Remote messages tags (group-related messages)
41    ////////////////////////////////////////////////////////////////////////////////////////////
42  
43    static final byte R_MCAST     = 1;            // Multicast messages
44    static final byte R_ACK       = 2;            // Interested message
45    static final byte R_ESTIM     = 3;            // Estimate
46    static final byte R_FORWARD   = 4;            // Delivered message
47    static final byte R_SYNCH     = 5;            // Synchronization message
48    static final byte R_SYMM      = 6;            // Symmetry message
49    static final byte R_PROP      = 7;            // Propose message
50    static final byte R_VIEW      = 8;            // New view
51    static final byte R_RESULT    = 9;            // Result message
52  
53  
54    ////////////////////////////////////////////////////////////////////////////////////////////
55    // Minimal tag for group unrelated messages
56    ////////////////////////////////////////////////////////////////////////////////////////////
57  
58    static final byte R_NOGID     = 100;          // Minimal tag for group unrelated messages
59  
60  
61    ////////////////////////////////////////////////////////////////////////////////////////////
62    // Remote messages tags (group-unrelated messages)
63    ////////////////////////////////////////////////////////////////////////////////////////////
64  
65    static final byte R_INTEREST  = 101;          // Interested message
66    static final byte R_NOINTEREST= 102;          // Interested message
67    static final byte R_LEAVE     = 102;          // Leave message
68    static final byte R_JOIN      = 103;          // Join message
69    static final byte R_JOINACK   = 104;          // Join ack message
70  
71    static final String R_TAGS[] = {"invalid", "R_MCAST", "R_ACK", "R_ESTIM", "R_FORWARD", 
72  	                          "R_SYNCH", "R_SYMM", "R_PROP", "R_VIEW", "R_RESULT" };
73  
74    static final String R_ExTAGS[] = { "R_NOGID", "R_INTEREST", "R_LEAVE", 
75  	  			     "R_JOIN", "R_JOINACK"};
76  
77  } // END Tag