javax.usb.event
Class UsbPipeEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byjavax.usb.event.UsbPipeEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
UsbPipeDataEvent, UsbPipeErrorEvent

public class UsbPipeEvent
extends java.util.EventObject

Class for USB pipe events.

Author:
E. Michael Maximilien, Dan Streetman
See Also:
Serialized Form

Constructor Summary
UsbPipeEvent(UsbPipe source)
          Constructor.
UsbPipeEvent(UsbPipe source, UsbIrp uI)
          Constructor.
 
Method Summary
 UsbIrp getUsbIrp()
          Get the UsbIrp associated with this event.
 UsbPipe getUsbPipe()
          Get the UsbPipe.
 boolean hasUsbIrp()
          If this has an associated UsbIrp.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UsbPipeEvent

public UsbPipeEvent(UsbPipe source)
Constructor.

This should only be used if there is no UsbIrp associated with this event.

Parameters:
source - The source UsbPipe.

UsbPipeEvent

public UsbPipeEvent(UsbPipe source,
                    UsbIrp uI)
Constructor.

Parameters:
source - The source UsbPipe.
uI - The UsbIrp.
Method Detail

getUsbPipe

public UsbPipe getUsbPipe()
Get the UsbPipe.

Returns:
The associated UsbPipe.

hasUsbIrp

public boolean hasUsbIrp()
If this has an associated UsbIrp.

Note that even if a byte[] was submitted to a UsbPipe, if the implementation used/created a UsbIrp to manage the submission, it may (or may not) provide that UsbIrp in any event generated from the submission.

Returns:
If this has an associated UsbIrp.

getUsbIrp

public UsbIrp getUsbIrp()
Get the UsbIrp associated with this event.

If there is no UsbIrp associated with this event, this returns null.

Returns:
The associated UsbIrp, or null.


Copyright © 2009 Eurotech Inc. All rights reserved.