Agent to handle abnormal termination of agents and perform appropriate action. Handles notifications sent to topic Topics.LIFECYCLE.
Modifiers | Name | Description |
---|---|---|
static int |
DEFAULT |
Setting the handling as DEFAULT uses the default behavior when an agent is abnormally terminated. |
static int |
IGNORE |
Setting the handling as IGNORE ignores the abnormal termination of the agent. |
static int |
REBOOT |
Setting the handling as RESPAWN causes the an abnormally termination of that agent to cause the stack to terminate (and therefore reboot, assuming an external watchdog for this). |
static int |
RESPAWN |
Setting the handling as RESPAWN causes the an agent that is abnormally terminated to be respawned. |
static String |
description |
|
static String |
title |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
die(Throwable ex) |
|
void |
processMessage(Message msg) |
|
void |
setDefaultTerminationHandling(int h) Sets the default handling of abormally terminated agents. |
|
void |
setRespawnDelay(int delay) Sets the delay before an agent is respawned or a custom handler is invoked. |
|
void |
setTerminationHandling(String aid, int h) Sets how an agent abnormal termination should be handled. |
|
void |
setTerminationHandling(String aid, Runnable h) Sets how an agent abnormal termination should be handled. |
Setting the handling as DEFAULT uses the default behavior when an agent is abnormally terminated.
Setting the handling as IGNORE ignores the abnormal termination of the agent.
Setting the handling as RESPAWN causes the an abnormally termination of that agent to cause the stack to terminate (and therefore reboot, assuming an external watchdog for this).
Setting the handling as RESPAWN causes the an agent that is abnormally terminated to be respawned.
Sets the default handling of abormally terminated agents. This may be set to AbnormalTerminationManager.IGNORE, AbnormalTerminationManager.RESPAWN or AbnormalTerminationManager.REBOOT.
h
- how to handle an abnormal termination of unspecified agentsSets the delay before an agent is respawned or a custom handler is invoked.
delay
- delay in millisecondsSets how an agent abnormal termination should be handled. The handling may be set of AbnormalTerminationManager.DEFAULT, AbnormalTerminationManager.IGNORE, AbnormalTerminationManager.RESPAWN or AbnormalTerminationManager.REBOOT.
aid
- agent nameh
- how to handle the abnormal termination of the specified agent