net.hivecell.hive.event.cell
Class AgentDisconnectFromAllCellEvent
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.AgentDisconnectFromAllCellEvent
- public class AgentDisconnectFromAllCellEvent
- extends CellEvent
This encapsulates an agent connect server event. Usually, the
sourceAddress and the destinationAddrses are null as set by the
CellEventMonitor. When the AgentMonitoringAgent rebroadcasts
these events out -- it will set these appropriatly from its cache
- 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 |
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 |
Agent |
getAgent()
Get the handle to the agent which has started the disconnection |
CellAddress |
getAgentAddress()
Get the cell address of the agent. |
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 |
AgentDisconnectFromAllCellEvent
public AgentDisconnectFromAllCellEvent(java.lang.Object broadcastingAgent,
long eventCount,
Agent agent,
CellAddress address)
- Create an agent from all disconnect 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 outagent
- the agent which is originating the disconnection
AgentDisconnectFromAllCellEvent
public AgentDisconnectFromAllCellEvent(java.lang.Object broadcastingAgent,
long eventCount,
Agent agent)
getAgent
public Agent getAgent()
- Get the handle to the agent which has started the disconnection
- Returns:
- the handle to the agent
getAgentAddress
public CellAddress getAgentAddress()
- Get the cell address of the agent. There is no guarantee that
this will not return null -- it depends on whether or not the
appropriate constructor was called
- Returns:
- the cell address of the agent
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