Sun SPOT API
Green Release  


com.sun.spot.peripheral.driver.proxy
Class ProxyDriver

java.lang.Object
  extended by com.sun.spot.peripheral.driver.proxy.ProxyDriver
All Implemented Interfaces:
IDriver

public final class ProxyDriver
extends Object
implements IDriver


Field Summary
 Channel channel
           
 
Constructor Summary
ProxyDriver(String name)
           
 
Method Summary
 boolean equals(Object arg0)
          Indicates whether some other object is "equal to" this one.
 int hashCode()
          Returns a hash code value for the object.
 String name()
          An identifying name for the driver (e.g.
 void setUp()
          Activate or reactivate the driver (after a deep sleep or when another driver refused to deep sleep).
 boolean tearDown()
          Deactivate the driver (usually in preparation for deep sleep).
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

channel

public Channel channel
Constructor Detail

ProxyDriver

public ProxyDriver(String name)
            throws NoSuchMailboxException
Throws:
NoSuchMailboxException
Method Detail

name

public String name()
Description copied from interface: IDriver
An identifying name for the driver (e.g. "AIC" for the AIC driver).

Specified by:
name in interface IDriver
Returns:
The driver name

tearDown

public boolean tearDown()
Description copied from interface: IDriver
Deactivate the driver (usually in preparation for deep sleep). The driver should store any important state and release all resources it has claimed from other drivers.

Specified by:
tearDown in interface IDriver
Returns:
True if the driver is able to deactivate, false if it cannot deactivate (e.g. due to being busy with a data transfer). If any driver returns false, no deep sleep occurs and all other drivers will be reactivated.

setUp

public void setUp()
Description copied from interface: IDriver
Activate or reactivate the driver (after a deep sleep or when another driver refused to deep sleep). The driver should claim all the resources it needs from other drivers and reinitialize its hardware. It should also restore any state saved before tearDown.

Specified by:
setUp in interface IDriver

equals

public boolean equals(Object arg0)
Description copied from class: Object
Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation:

The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any reference values x and y, this method returns true if and only if x and y refer to the same object (x==y has the value true).

Overrides:
equals in class Object
Parameters:
arg0 - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

Sun SPOT API
Green Release  


Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.