KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgroups > Address


1 // $Id: Address.java,v 1.3 2005/04/15 13:17:04 belaban Exp $
2

3 package org.jgroups;
4
5 import org.jgroups.util.Streamable;
6
7 import java.io.Externalizable JavaDoc;
8
9
10
11 /**
12  * Abstract address. Used to identify members on a group to send messages to.
13  * Addresses are mostly generated by the bottom-most (transport) layers (e.g. UDP, TCP, LOOPBACK).
14  * Subclasses need to implement the following methods:
15  * <ul>
16  * <li>isMultiCastAddress()
17  * <li>equals()
18  * <li>hashCode()
19  * <li>compareTo()
20  * </ol>
21  * @author Bela Ban
22  */

23 public interface Address extends Externalizable JavaDoc, Streamable, Comparable JavaDoc, Cloneable JavaDoc { // todo: remove Externalizable
24

25     /**
26      * Checks whether this is an address that represents multiple destinations,
27      * e.g. a class D address in the internet
28      * @return true if this is a multicast address, false if it is a unicast address
29      */

30     boolean isMulticastAddress();
31
32     /** Returns serialized size of this address */
33     int size();
34 }
35
Popular Tags