net.hivecell.hive.event.cell
Class CellBornCellEvent
java.lang.Object
|
+--java.util.EventObject
|
+--net.hivecell.hive.event.RemoteEvent
|
+--net.hivecell.hive.event.HiveEvent
|
+--net.hivecell.hive.event.cell.CellEvent
|
+--net.hivecell.hive.event.cell.CellBornCellEvent
- public class CellBornCellEvent
- extends CellEvent
- See Also:
- Serialized Form
Fields inherited from class net.hivecell.hive.event.cell.CellEvent |
AGENTBORN,
AGENTDISCONNECTALL,
AGENTDYING,
AGENTMESSAGE,
AGENTMOVINGFROM,
AGENTMOVINGTO,
AGENTSCONNECT,
AGENTSDISCONNECT,
eventCount,
SERVERBORN,
serverEventCode,
SERVERGOINGDOWN,
SERVERREPORT,
SERVERWITHDRAWN,
source |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
CellBornCellEvent(java.lang.Object broadcastingAgent,
long eventCount,
CellAddress serverBorn)
Create an agent born server event. |
Method Summary |
CellEvent |
createNewEvent(java.lang.Object newSender,
long eventCount)
This method is used so a new CellEvent type can be created
with this data, but with a different source and a different
count |
CellAddress |
getAddress()
Get the address to the cell that was born |
CellAddress[] |
getCellAddresses()
This methoud should return all the servers taht this server
event pertains to -- "pertains to" is defined by the server
event itself |
boolean |
matchesCellAddress(CellAddress toTest)
This method should return true if the cell address that it
comparing with pertains to this server event -- it will return
false otherwise |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
CellBornCellEvent
public CellBornCellEvent(java.lang.Object broadcastingAgent,
long eventCount,
CellAddress serverBorn)
- Create an agent born server event.
- Parameters:
broadcastingAgent
- the agent which is going to be sending out this eventeventCount
- the number of event which the helper is going to send outserverBorn
- the address of the cell that was born
getAddress
public CellAddress getAddress()
- Get the address to the cell that was born
- Returns:
- the address of the cell
matchesCellAddress
public boolean matchesCellAddress(CellAddress toTest)
- Description copied from class: CellEvent
- This method should return true if the cell address that it
comparing with pertains to this server event -- it will return
false otherwise
- Overrides:
- matchesCellAddress in class CellEvent
- Tags copied from class: CellEvent
- Parameters:
toTest
- the address to test on- Returns:
- true if the toTest pertains to this server event
getCellAddresses
public CellAddress[] getCellAddresses()
- Description copied from class: CellEvent
- This methoud should return all the servers taht this server
event pertains to -- "pertains to" is defined by the server
event itself
- Overrides:
- getCellAddresses in class CellEvent
- Tags copied from class: CellEvent
- Returns:
- an array of server addresses this event pertains to
createNewEvent
public CellEvent createNewEvent(java.lang.Object newSender,
long eventCount)
- Description copied from class: CellEvent
- This method is used so a new CellEvent type can be created
with this data, but with a different source and a different
count
- Overrides:
- createNewEvent in class CellEvent
- Tags copied from class: CellEvent
- Parameters:
newSender
- the new sender to create a server event witheventCount
- the new event count- Returns:
- a new server event with the new senders and the count