AgentState
public class AgentConfigManager.AgentState extends java.lang.Object implements AgentState
STATE_CONFIGURED, STATE_CREATED, STATE_INITIALIZED, STATE_RESTORED, STATE_RUNNING, STATE_SAVED, STATE_SHUTDOWN, STATE_SUSPENDED
Constructor | Description |
---|---|
AgentState() |
Modifier and Type | Method | Description |
---|---|---|
void |
addError(org.snmp4j.agent.AgentConfigManager.ErrorDescriptor error) |
Add an error description to the internal error list.
|
void |
advanceState(int newState) |
Advance the state to the given state.
|
java.util.List<org.snmp4j.agent.AgentConfigManager.ErrorDescriptor> |
getErrors() |
Get the error descriptors associated with this agent state.
|
int |
getState() |
Gets the current state of the agent.
|
void |
setState(int newState) |
Sets the new state independent from the current state.
|
public int getState()
AgentState
getState
in interface AgentState
AgentState.STATE_CREATED
.public void setState(int newState)
setState
in interface AgentState
newState
- the new state.public void advanceState(int newState)
advanceState
in interface AgentState
newState
- the new minimum state.public void addError(org.snmp4j.agent.AgentConfigManager.ErrorDescriptor error)
addError
in interface AgentState
error
- an ErrorDescriptor instance to add.public java.util.List<org.snmp4j.agent.AgentConfigManager.ErrorDescriptor> getErrors()
getErrors
in interface AgentState
Copyright © 2018 SNMP4J.org. All rights reserved.