- java.lang.Object
-
- org.snmp4j.agent.AgentConfigManager.AgentState
-
- All Implemented Interfaces:
AgentState
- Enclosing class:
- AgentConfigManager
public class AgentConfigManager.AgentState extends java.lang.Object implements AgentState
-
-
Field Summary
-
Fields inherited from interface org.snmp4j.agent.AgentState
STATE_CONFIGURED, STATE_CREATED, STATE_INITIALIZED, STATE_RESTORED, STATE_RUNNING, STATE_SAVED, STATE_SHUTDOWN, STATE_SUSPENDED
-
-
Constructor Summary
Constructors Constructor Description AgentState()
-
Method Summary
All Methods Instance Methods Concrete Methods 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.
-
-
-
Method Detail
-
getState
public int getState()
Description copied from interface:AgentState
Gets the current state of the agent.- Specified by:
getState
in interfaceAgentState
- Returns:
- an integer representing the current state. See
AgentState.STATE_CREATED
.
-
setState
public void setState(int newState)
Sets the new state independent from the current state.- Specified by:
setState
in interfaceAgentState
- Parameters:
newState
- the new state.
-
advanceState
public void advanceState(int newState)
Advance the state to the given state. If the current state is greater than the provided state, the current state will not be changed.- Specified by:
advanceState
in interfaceAgentState
- Parameters:
newState
- the new minimum state.
-
addError
public void addError(org.snmp4j.agent.AgentConfigManager.ErrorDescriptor error)
Add an error description to the internal error list.- Specified by:
addError
in interfaceAgentState
- Parameters:
error
- an ErrorDescriptor instance to add.
-
getErrors
public java.util.List<org.snmp4j.agent.AgentConfigManager.ErrorDescriptor> getErrors()
Get the error descriptors associated with this agent state.- Specified by:
getErrors
in interfaceAgentState
- Returns:
- the errors descriptor list.
-
-