java.lang.Object
org.snmp4j.agent.AgentConfigManager.AgentState
- All Implemented Interfaces:
AgentState
- Enclosing class:
AgentConfigManager
The
AgentConfigManager.AgentState provides information about the state of this SNMP agent.
States are represented by integer values.- Since:
- 3.0
- Version:
- 3.0.2
- Author:
- Frank Fock
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.snmp4j.agent.AgentState
AgentState.ErrorDescriptor -
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an error description to the internal error list.voidadvanceState(int newState) Advance the state to the given state.Get the error descriptors associated with this agent state.intgetState()Gets the current state of the agent.voidsetState(int newState) Sets the new state independent from the current state.
-
Constructor Details
-
AgentState
public AgentState()
-
-
Method Details
-
getState
public int getState()Description copied from interface:AgentStateGets the current state of the agent.- Specified by:
getStatein 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:
setStatein 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:
advanceStatein interfaceAgentState- Parameters:
newState- the new minimum state.
-
addError
Add an error description to the internal error list.- Specified by:
addErrorin interfaceAgentState- Parameters:
error- an ErrorDescriptor instance to add.
-
getErrors
Get the error descriptors associated with this agent state.- Specified by:
getErrorsin interfaceAgentState- Returns:
- the error descriptor list.
-