com.ibm.jusb.os
Class DefaultUsbInterfaceOsImp

java.lang.Object
  extended by com.ibm.jusb.os.DefaultUsbInterfaceOsImp
All Implemented Interfaces:
UsbInterfaceOsImp

public class DefaultUsbInterfaceOsImp
extends Object
implements UsbInterfaceOsImp

Default UsbInterfaceOsImp implementation.

This provides a simple in-Java claiming implementation. By default claiming is allowed. If the 1-parameter constructor is used, its value determines if claiming is allowed or denied.

Author:
Dan Streetman

Field Summary
protected  boolean allowClaim
           
protected  boolean isClaimed
           
 
Constructor Summary
DefaultUsbInterfaceOsImp()
          Constructor.
DefaultUsbInterfaceOsImp(boolean b)
          Constructor.
 
Method Summary
 void claim()
          Claim this interface.
 void claim(UsbInterfacePolicy policy)
          Claim this interface using a UsbInterfacePolicy.
 boolean isClaimed()
          Indicate if this interface is claimed.
 void release()
          Release this interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isClaimed

protected boolean isClaimed

allowClaim

protected boolean allowClaim
Constructor Detail

DefaultUsbInterfaceOsImp

public DefaultUsbInterfaceOsImp()
Constructor.


DefaultUsbInterfaceOsImp

public DefaultUsbInterfaceOsImp(boolean b)
Constructor.

Parameters:
b - If claiming should be allowed or not.
Method Detail

claim

public void claim()
           throws UsbException
Claim this interface.

This performs a simple in-Java claim.

Specified by:
claim in interface UsbInterfaceOsImp
Throws:
UsbException - if the interface could not be claimed.

claim

public void claim(UsbInterfacePolicy policy)
           throws UsbException
Claim this interface using a UsbInterfacePolicy.

Specified by:
claim in interface UsbInterfaceOsImp
Parameters:
policy - The this class ignores the policy.
Throws:
UsbException - if the interface could not be claimed.

release

public void release()
             throws UsbException
Release this interface.

This performs a simple in-Java release.

Specified by:
release in interface UsbInterfaceOsImp
Throws:
UsbException - If the interface could not be released.

isClaimed

public boolean isClaimed()
Indicate if this interface is claimed.

This returns the state of the simple in-Java claim.

Specified by:
isClaimed in interface UsbInterfaceOsImp
Returns:
If this interface is claimed.


Copyright © 2013 LSST. All Rights Reserved.