- java.lang.Object
-
- java.util.EventObject
-
- org.snmp4j.agent.mo.DeniableEventObject
-
- org.snmp4j.agent.mo.MOTableRowEvent<R>
-
- Type Parameters:
R
- TheMOTable
row type of this event.
- All Implemented Interfaces:
java.io.Serializable
public class MOTableRowEvent<R extends MOTableRow> extends DeniableEventObject
TheMOTableRowEvent
class describes the changes- Version:
- 2.2
- Author:
- Frank Fock
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
ADD
A row is added.static int
CHANGE
A single column of a row is changed.static int
CREATE
A row is created.static int
DELETE
A row is deleted.static int
EXISTS
A row exists in the table at the moment when the correspondingMOTableRowListener
has been added to the table.static int
UPDATED
This event type indicates that a complete row has been updated.
-
Constructor Summary
Constructors Constructor Description MOTableRowEvent(java.lang.Object source, MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table, R row, int type)
Creates a table row event based on table, row and type that cannot be canceled by the event listener.MOTableRowEvent(java.lang.Object source, MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table, R row, int type, boolean deniable)
Creates a table row event based on table, row and type that may be canceled by the event listener depending on the specified flag.MOTableRowEvent(java.lang.Object source, MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table, R row, MOTableRow preparedChanges, int type)
Creates a table row event based on table, row, prepared changes, and type that cannot be canceled by the event listener.MOTableRowEvent(java.lang.Object source, MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table, R row, MOTableRow preparedChanges, int type, boolean deniable)
Creates a table row event based on table, row, prepared changes, and type.MOTableRowEvent(java.lang.Object source, MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table, R row, MOTableRow preparedChanges, int type, boolean deniable, int numberOfConsecutiveEventsOfSameOrigin)
Creates a table row event based on table, row, prepared changes, and type that cannot be canceled by the event listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNumberOfConsecutiveEventsOfSameOrigin()
MOTableRow
getPreparedChanges()
R
getRow()
MOTable<R,? extends MOColumn,? extends MOTableModel<R>>
getTable()
int
getType()
int
getVetoColumn()
int
getVetoStatus()
Returns the veto status that revokes the row operation or zero if the row operation is accepted by all listeners.boolean
isSendNextEventsOfSameOrigin()
void
setSendNextEventsOfSameOrigin(boolean sendNextEventsOfSameOrigin)
void
setVetoColumn(int vetoColumn)
Sets the column index on whose behalf the veto is issued.void
setVetoStatus(int denyReason)
Sets the veto status that revokes the row operation.java.lang.String
toString()
-
Methods inherited from class org.snmp4j.agent.mo.DeniableEventObject
getDenyReason, isDeniable, setDenyReason
-
-
-
-
Field Detail
-
CHANGE
public static final int CHANGE
A single column of a row is changed.- See Also:
- Constant Field Values
-
CREATE
public static final int CREATE
A row is created.- See Also:
- Constant Field Values
-
ADD
public static final int ADD
A row is added.- See Also:
- Constant Field Values
-
DELETE
public static final int DELETE
A row is deleted.- See Also:
- Constant Field Values
-
UPDATED
public static final int UPDATED
This event type indicates that a complete row has been updated.- See Also:
- Constant Field Values
-
EXISTS
public static final int EXISTS
A row exists in the table at the moment when the correspondingMOTableRowListener
has been added to the table. Processing this event type can be used to create dependent rows in augmenting or otherwise extending tables.- Since:
- 3.0
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MOTableRowEvent
public MOTableRowEvent(java.lang.Object source, MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table, R row, int type)
Creates a table row event based on table, row and type that cannot be canceled by the event listener.- Parameters:
source
- the event source.table
- the table.row
- the row associated with this event.type
- the event type.
-
MOTableRowEvent
public MOTableRowEvent(java.lang.Object source, MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table, R row, int type, boolean deniable)
Creates a table row event based on table, row and type that may be canceled by the event listener depending on the specified flag.- Parameters:
source
- the event source.table
- the table.row
- the row associated with this event.type
- the event type.deniable
- indicates whether the event can be canceled through setting its denyReason member to a SNMP error status.- Since:
- 1.1
-
MOTableRowEvent
public MOTableRowEvent(java.lang.Object source, MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table, R row, MOTableRow preparedChanges, int type)
Creates a table row event based on table, row, prepared changes, and type that cannot be canceled by the event listener.- Parameters:
source
- the event source.table
- the table.row
- the row associated with this event.preparedChanges
- a row instance containing the prepared changes forrow
.type
- the event type.
-
MOTableRowEvent
public MOTableRowEvent(java.lang.Object source, MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table, R row, MOTableRow preparedChanges, int type, boolean deniable, int numberOfConsecutiveEventsOfSameOrigin)
Creates a table row event based on table, row, prepared changes, and type that cannot be canceled by the event listener.- Parameters:
source
- the event source.table
- the table.row
- the row associated with this event.preparedChanges
- a row instance containing the prepared changes forrow
.type
- the event type.deniable
- indicates whether the event can be canceled through setting its denyReason member to a SNMP error status.numberOfConsecutiveEventsOfSameOrigin
- specifies the total number of events that will are triggered by the same origin at once, for example the number of rows in a table with event typeEXISTS
, when a listener is added to the table. The count is exclusive this event.- Since:
- 3.0
-
MOTableRowEvent
public MOTableRowEvent(java.lang.Object source, MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table, R row, MOTableRow preparedChanges, int type, boolean deniable)
Creates a table row event based on table, row, prepared changes, and type.- Parameters:
source
- the event source.table
- the table.row
- the row associated with this event.preparedChanges
- a row instance containing the prepared changes forrow
.type
- the event type.deniable
- indicates whether the event can be canceled through setting its denyReason member to a SNMP error status.- Since:
- 1.1
-
-
Method Detail
-
getRow
public R getRow()
-
getTable
public MOTable<R,? extends MOColumn,? extends MOTableModel<R>> getTable()
-
getType
public int getType()
-
getVetoStatus
public int getVetoStatus()
Returns the veto status that revokes the row operation or zero if the row operation is accepted by all listeners.- Returns:
- a SNMP or sub-agent protocol error status or zero if the row operation is accepted.
-
getPreparedChanges
public MOTableRow getPreparedChanges()
-
getVetoColumn
public int getVetoColumn()
-
setVetoStatus
public void setVetoStatus(int denyReason)
Sets the veto status that revokes the row operation.- Parameters:
denyReason
- a SNMP error status or a sub-agent protocol specific error status. In any case zero represents no error.
-
setVetoColumn
public void setVetoColumn(int vetoColumn)
Sets the column index on whose behalf the veto is issued.- Parameters:
vetoColumn
- a column index.
-
getNumberOfConsecutiveEventsOfSameOrigin
public int getNumberOfConsecutiveEventsOfSameOrigin()
-
isSendNextEventsOfSameOrigin
public boolean isSendNextEventsOfSameOrigin()
-
setSendNextEventsOfSameOrigin
public void setSendNextEventsOfSameOrigin(boolean sendNextEventsOfSameOrigin)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.util.EventObject
-
-