KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > catalina > cluster > ClusterMessage


1 /*
2  * Copyright 1999,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.catalina.cluster;
17
18 import java.io.Serializable JavaDoc;
19
20 public interface ClusterMessage
21     extends Serializable JavaDoc {
22     /**
23      * Get the address that this message originated from. This would be set
24      * if the message was being relayed from a host other than the one
25      * that originally sent it.
26      */

27     public Member getAddress();
28
29     /**
30      * Called by the cluster before sending it to the other
31      * nodes
32      * @param member Member
33      */

34     public void setAddress(Member member);
35
36     /**
37      * Timestamp message
38      * @return long
39      */

40     public long getTimestamp();
41
42     /**
43      * Called by the cluster before sending out
44      * the message
45      * @param timestamp long
46      */

47     public void setTimestamp(long timestamp);
48
49     /**
50      * Each message must have a unique ID, in case of using async replication,
51      * and a smart queue, this id is used to replace messages not yet sent
52      * @return String
53      */

54     public String JavaDoc getUniqueId();
55
56 }
57
Popular Tags