An event is sent to a ResourceListener when resource usage violates
one of their thresholds.
ResourceEvent objects are delivered synchronously to all
matching ResourceListener services. A typed code is used to identify
the event.
ResourceListener
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ERROR
Type of ResourceEvent indicating a threshold goes to the ERROR state. |
| private final boolean | |
| public static final int | NORMAL
Type of ResourceEvent indicating a threshold goes to the NORMAL state. |
| private final ResourceContext | |
| private final int | |
| private final Comparable | |
| public static final int | WARNING
Type of ResourceEvent indicating a threshold goes to the WARNING state. |
| Access | Constructor and Description |
|---|---|
| public | ResourceEvent(final int
the event type pType, final ResourceContext the resource context pContext, final boolean whether it is an upper threshold pIsUpperThreshold, final Comparable<T> the value pValue)Creates a new ResourceEvent. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. var0)Overrides java. Indicates whether some other object is "equal to" this one. |
| public ResourceContext | Returns: The resource context that caused the event.Returns the resource context that caused the event. |
| public int | |
| public Comparable | Returns: the resource consumption value, or null if a resource monitor is not relevant.Returns the resource consumption value. |
| public int | |
| public boolean | Returns: true if it is an upper threshold.Returns true if the threshold triggering this event is an upper threshold. |
| public String |
| ERROR | back to summary |
|---|---|
| public static final int ERROR Type of ResourceEvent indicating a threshold goes to the ERROR state. | |
| isUpperThreshold | back to summary |
|---|---|
| private final boolean isUpperThreshold | |
| NORMAL | back to summary |
|---|---|
| public static final int NORMAL Type of ResourceEvent indicating a threshold goes to the NORMAL state. | |
| resourceContext | back to summary |
|---|---|
| private final ResourceContext resourceContext | |
| type | back to summary |
|---|---|
| private final int type | |
| value | back to summary |
|---|---|
| private final Comparable<T> value | |
| WARNING | back to summary |
|---|---|
| public static final int WARNING Type of ResourceEvent indicating a threshold goes to the WARNING state. | |
| ResourceEvent | back to summary |
|---|---|
| public ResourceEvent(final int pType, final ResourceContext pContext, final boolean pIsUpperThreshold, final Comparable<T> pValue) Creates a new ResourceEvent.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object var0) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getContext | back to summary |
|---|---|
| public ResourceContext getContext() Returns the resource context that caused the event.
| |
| getType | back to summary |
|---|---|
| public int getType() Returns the event type. The type values are:
| |
| getValue | back to summary |
|---|---|
| public Comparable Returns the resource consumption value. Relevant only for event types
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isUpperThreshold | back to summary |
|---|---|
| public boolean isUpperThreshold() Returns true if the threshold triggering this event is an upper
threshold. This method is only used when
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |