groupmgmt.impl
Class MemberBeacon

java.lang.Object
  extended bygroupmgmt.impl.MemberBeacon
All Implemented Interfaces:
java.io.Serializable

class MemberBeacon
extends java.lang.Object
implements java.io.Serializable

The MemberBeacon class; A serializable class that includes Member information. Can optionally include a location as well (see location package).

Version:
June 2003
Author:
Christine Julien, Tom Elgin

Field Summary
private  Location location
           
private  Member member
           
private  boolean stopping
           
 
Constructor Summary
MemberBeacon(Member member)
          Constructor that sets the corresponding values in the beacon.
MemberBeacon(Member member, boolean stopping)
          Constructor that sets the corresponding values in the beacon.
MemberBeacon(Member member, Location location)
          Constructor that sets the corresponding values in the beacon.
MemberBeacon(Member member, Location location, boolean stopping)
          Constructor that sets the corresponding values in the beacon.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true if the specified object is a MemberBeacon and has the same Member, location (if any), and stopping flag.
 Location getLocation()
          Allows access to the physical location of the source of this beacon.
 Member getMember()
          Allows access to the Member that sent this beacon.
 boolean getStopping()
          Allows access to thestopping variable.
 int hashCode()
          Returns a hash value based on the Member, location, and stopping flag.
 void setBeacon(Member member, Location location)
          Resets the beacon using the provided information.
 void setBeacon(Member member, Location location, boolean stopping)
          Resets the beacon using the provided information.
 void setLocation(Location location)
          Sets the location value to the new value.
 void setMember(Member member)
          Sets a new Member for this beacon.
 void setStopping(boolean stopping)
          Sets the stopping variable to the provided variable.
 java.lang.String toString()
          Get a String representation of the beacon
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

member

private Member member

location

private Location location

stopping

private boolean stopping
Constructor Detail

MemberBeacon

public MemberBeacon(Member member,
                    Location location,
                    boolean stopping)
Constructor that sets the corresponding values in the beacon.

Parameters:
member - The Member object identifying the host.
location - The physical location of the host.
stopping - True if the host is shutting down.

MemberBeacon

public MemberBeacon(Member member,
                    Location location)
Constructor that sets the corresponding values in the beacon.

Parameters:
member - The Member object identifying the host.
location - The physical location of the host.

MemberBeacon

public MemberBeacon(Member member)
Constructor that sets the corresponding values in the beacon.

Parameters:
member - The Member object identifying the host.

MemberBeacon

public MemberBeacon(Member member,
                    boolean stopping)
Constructor that sets the corresponding values in the beacon.

Parameters:
member - The Member object identifying the host.
stopping - True if the host is shutting down.
Method Detail

setBeacon

public void setBeacon(Member member,
                      Location location)
Resets the beacon using the provided information.

Parameters:
member - The Member object identifying the host.
location - The physical location of the host.

setBeacon

public void setBeacon(Member member,
                      Location location,
                      boolean stopping)
Resets the beacon using the provided information.

Parameters:
member - The Member object identifying the host.
location - The physical location of the host.
stopping - True if the host is shutting down.

setMember

public void setMember(Member member)
Sets a new Member for this beacon.

Parameters:
member - The Member object identifying the host.

setLocation

public void setLocation(Location location)
Sets the location value to the new value.

Parameters:
location - The physical location of the host.

setStopping

public void setStopping(boolean stopping)
Sets the stopping variable to the provided variable.

Parameters:
stopping - True if the host is shutting down.

getMember

public Member getMember()
Allows access to the Member that sent this beacon.

Returns:
The Member object identifying the host.

getLocation

public Location getLocation()
Allows access to the physical location of the source of this beacon.

Returns:
The physical location of the host.

getStopping

public boolean getStopping()
Allows access to thestopping variable.

Returns:
True if the host is shutting down.

equals

public boolean equals(java.lang.Object o)
Returns true if the specified object is a MemberBeacon and has the same Member, location (if any), and stopping flag.

Parameters:
o - The object to compare this MemberBeacon to.
Returns:
True if the specified object matches this one.

hashCode

public int hashCode()
Returns a hash value based on the Member, location, and stopping flag.

Returns:
The hash value.

toString

public java.lang.String toString()
Get a String representation of the beacon

Returns:
The Member @ it's location and "stopping" if it's stopping.