public class ResourceEvent
extends java.lang.Object
If additional ResourceEvent types are required, this class can be extended to include the required types
| Modifier and Type | Field and Description |
|---|---|
static int |
BUSY
Event type used to indicate that the resource is busy.
|
static int |
FAILURE
Event type used to indicate a failure in the resource.
|
static int |
OKAY
Event type used to indicate resource status is okay.
|
static int |
WARNING
Event type used to indicate a warning message from the resource.
|
| Constructor and Description |
|---|
ResourceEvent(java.lang.String message,
int eventType,
Resource resource)
A ResourceEvent requires a message indicating the status
of the event, the type of event that occured, and the Resource that
was the source of the event.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getEventType()
Returns the eventType sent by the Resource
|
java.lang.String |
getMessage()
Returns the message sent by the Resource.
|
Resource |
getResource()
Returns the Resource
|
public static final int OKAY
public static final int WARNING
public static final int BUSY
public static final int FAILURE
public ResourceEvent(java.lang.String message,
int eventType,
Resource resource)
message - Defines a message received fron the ResourceeventType - the eventType of the ResourceEventresource - the Resource that caused this event to happen. Useful
for event handling.public java.lang.String getMessage()
public int getEventType()
public Resource getResource()