com.ibm.as400.resource
Class ResourceListEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.ibm.as400.resource.ResourceListEvent
All Implemented Interfaces:
java.io.Serializable

public class ResourceListEvent
extends java.util.EventObject

The ResourceListEvent class represents a resource list event.

See Also:
Serialized Form

Field Summary
static int LENGTH_CHANGED
          Event ID indicating that the length of the list changed.
static int LIST_CLOSED
          Event ID indicating that the list is closed.
static int LIST_COMPLETED
          Event ID indicating that the list is completely loaded.
static int LIST_IN_ERROR
          Event ID indicating that the list is not completely loaded due to an error.
static int LIST_OPENED
          Event ID indicating that the list is opened.
static int RESOURCE_ADDED
          Event ID indicating that a resource is added to the list.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ResourceListEvent(java.lang.Object source, int eventID)
          Constructs a ResourceListEvent object.
ResourceListEvent(java.lang.Object source, int eventID, long length)
          Constructs a ResourceListEvent object.
ResourceListEvent(java.lang.Object source, int eventID, Resource resource, long index)
          Constructs a ResourceListEvent object.
 
Method Summary
 int getID()
          Returns the event ID.
 long getIndex()
          Returns the index of the associated resource within the list.
 long getLength()
          Returns the length of the list.
 Resource getResource()
          Returns the associated resource.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LENGTH_CHANGED

public static final int LENGTH_CHANGED
Event ID indicating that the length of the list changed.

LIST_CLOSED

public static final int LIST_CLOSED
Event ID indicating that the list is closed.

LIST_COMPLETED

public static final int LIST_COMPLETED
Event ID indicating that the list is completely loaded.

LIST_IN_ERROR

public static final int LIST_IN_ERROR
Event ID indicating that the list is not completely loaded due to an error.

LIST_OPENED

public static final int LIST_OPENED
Event ID indicating that the list is opened.

RESOURCE_ADDED

public static final int RESOURCE_ADDED
Event ID indicating that a resource is added to the list.
Constructor Detail

ResourceListEvent

public ResourceListEvent(java.lang.Object source,
                         int eventID)
Constructs a ResourceListEvent object.
Parameters:
source - The source.
eventID - The event ID.

ResourceListEvent

public ResourceListEvent(java.lang.Object source,
                         int eventID,
                         Resource resource,
                         long index)
Constructs a ResourceListEvent object.
Parameters:
source - The source.
eventID - The event ID.
resource - The associated resource, or null if none.
index - The index of the associated resource within the list.

ResourceListEvent

public ResourceListEvent(java.lang.Object source,
                         int eventID,
                         long length)
Constructs a ResourceListEvent object.
Parameters:
source - The source.
eventID - The event ID.
length - The list length.
Method Detail

getID

public int getID()
Returns the event ID.
Returns:
The event ID.

getIndex

public long getIndex()
Returns the index of the associated resource within the list.
Returns:
The index of the associated resource within the list, or -1 if there is no associated resource.

getLength

public long getLength()
Returns the length of the list.
Returns:
The length the list, or -1 if the length of the list is not relevant.

getResource

public Resource getResource()
Returns the associated resource.
Returns:
The associated resource, or null if none.