- java.lang.Object
-
- java.util.EventObject
-
- org.snmp4j.agent.mo.DeniableEventObject
-
- org.snmp4j.agent.mo.snmp.RowStatusEvent
-
- All Implemented Interfaces:
Serializable
public class RowStatusEvent extends DeniableEventObject
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description RowStatusEvent(Object source, MOTable<?,?,?> table, MOTableRow row, MOTableRow changeSet, int oldStatus, int newStatus)
RowStatusEvent(Object source, MOTable<?,?,?> table, MOTableRow row, MOTableRow changeSet, int oldStatus, int newStatus, boolean deniable)
RowStatusEvent(Object source, MOTable<?,?,?> table, MOTableRow row, MOTableRow changeSet, int oldStatus, int newStatus, boolean deniable, SubRequest<?> request)
Creates a row status event and associates a security name with the status change.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MOTableRow
getChangeSet()
int
getNewStatus()
int
getOldStatus()
SubRequest<?>
getRequest()
Returns the request (SNMP or AgentX) associated with this event.MOTableRow
getRow()
MOTable<?,?,?>
getTable()
boolean
isRowActivated()
Checks whether the row event represents an activation of a row.boolean
isRowDeactivated()
Checks whether the row event represents a deactivation of a row.-
Methods inherited from class org.snmp4j.agent.mo.DeniableEventObject
getDenyReason, isDeniable, setDenyReason
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
RowStatusEvent
public RowStatusEvent(Object source, MOTable<?,?,?> table, MOTableRow row, MOTableRow changeSet, int oldStatus, int newStatus)
-
RowStatusEvent
public RowStatusEvent(Object source, MOTable<?,?,?> table, MOTableRow row, MOTableRow changeSet, int oldStatus, int newStatus, boolean deniable)
-
RowStatusEvent
public RowStatusEvent(Object source, MOTable<?,?,?> table, MOTableRow row, MOTableRow changeSet, int oldStatus, int newStatus, boolean deniable, SubRequest<?> request)
Creates a row status event and associates a security name with the status change.- Parameters:
source
- the source that triggered the event.table
- the MOTable instance the RowStatus belongs to.row
- the MOTableRow instance the RowStatus belongs to.changeSet
- the change set this status change is part of.oldStatus
- the old row status.newStatus
- the new row status.deniable
- defines whether status change can be denied or not.request
- the request that triggered this event.- Since:
- 1.4
-
-
Method Detail
-
getNewStatus
public int getNewStatus()
-
getOldStatus
public int getOldStatus()
-
getRow
public MOTableRow getRow()
-
getTable
public MOTable<?,?,?> getTable()
-
getChangeSet
public MOTableRow getChangeSet()
-
isRowActivated
public boolean isRowActivated()
Checks whether the row event represents an activation of a row. To distinguish between a committing and a preparing row status event, useDeniableEventObject.isDeniable()
. If that method returnstrue
, then the event is fired on behalf of the preparation phase.- Returns:
true
if the new row status is createAndGo(4) or active(1) and the old status is not active(1).
-
isRowDeactivated
public boolean isRowDeactivated()
Checks whether the row event represents a deactivation of a row. To distinguish between a committing and a preparing row status event, useDeniableEventObject.isDeniable()
. If that method returnstrue
, then the event is fired on behalf the preparation phase.- Returns:
true
if the new row status is destroy(6) or notInService(2) and the old status is active(1).
-
getRequest
public SubRequest<?> getRequest()
Returns the request (SNMP or AgentX) associated with this event.- Returns:
- the request that triggered this status change or
null
if the request is not known/has not been provided. - Since:
- 1.4
-
-