use of org.snmp4j.agent.request.RequestStatus in project opennms by OpenNMS.
the class PropertiesBackedManagedObject method cleanup.
/** {@inheritDoc} */
@Override
public void cleanup(final SubRequest request) {
m_oldValue = null;
final RequestStatus status = request.getStatus();
status.setPhaseComplete(true);
}
use of org.snmp4j.agent.request.RequestStatus in project opennms by OpenNMS.
the class PropertiesBackedManagedObject method undo.
/** {@inheritDoc} */
@Override
public void undo(final SubRequest request) {
m_vars.put(request.getVariableBinding().getOid(), m_oldValue);
m_oldValue = null;
final RequestStatus status = request.getStatus();
status.setErrorStatus(SnmpConstants.SNMP_ERROR_SUCCESS);
status.setPhaseComplete(true);
}
use of org.snmp4j.agent.request.RequestStatus in project opennms by OpenNMS.
the class PropertiesBackedManagedObject method commit.
/** {@inheritDoc} */
@Override
public void commit(final SubRequest request) {
final VariableBinding vb = request.getVariableBinding();
final Variable v = vb.getVariable();
m_vars.put(vb.getOid(), v);
final RequestStatus status = request.getStatus();
status.setPhaseComplete(true);
}
use of org.snmp4j.agent.request.RequestStatus in project opennms by OpenNMS.
the class PropertiesBackedManagedObject method prepare.
/** {@inheritDoc} */
@Override
public void prepare(final SubRequest request) {
// store the old value, in case we undo it
final VariableBinding vb = request.getVariableBinding();
m_oldValue = m_vars.get(vb.getOid());
final RequestStatus status = request.getStatus();
status.setErrorStatus(SnmpConstants.SNMP_ERROR_SUCCESS);
status.setPhaseComplete(true);
}
Aggregations