SunSPOT API V3.0


com.sun.spot.sensorboard
Class OTAExtension

java.lang.Object
  extended by com.sun.spot.sensorboard.OTAExtension
All Implemented Interfaces:
IOTACommand, IOTACommandProcessorExtension

public class OTAExtension
extends Object
implements IOTACommandProcessorExtension, IOTACommand


Field Summary
 
Fields inherited from interface com.sun.spot.peripheral.ota.IOTACommandProcessorExtension
OTA_COMMAND_PROCESSOR_EXTENSION_PREFIX
 
Constructor Summary
OTAExtension()
           
 
Method Summary
 void configureCommands(IOTACommandRepository repository)
          Call back invoked when command processor extensions are installed.
 int getSecurityLevelFor(String command)
          Answer the security level for a command.
 boolean processCommand(String command, DataInputStream params, IOTACommandHelper helper)
          Attempt to process a command.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OTAExtension

public OTAExtension()
Method Detail

configureCommands

public void configureCommands(IOTACommandRepository repository)
Description copied from interface: IOTACommandProcessorExtension
Call back invoked when command processor extensions are installed. The receiver should add and replace commands using IOTACommandRepository.addCommand(String, IOTACommand)

Specified by:
configureCommands in interface IOTACommandProcessorExtension
Parameters:
repository - the repository to adjust

getSecurityLevelFor

public int getSecurityLevelFor(String command)
Description copied from interface: IOTACommand
Answer the security level for a command. See IOTACommandHelper.DEVICE_SECURITY_LEVEL

Specified by:
getSecurityLevelFor in interface IOTACommand
Parameters:
command - the command in question
Returns:
the security level

processCommand

public boolean processCommand(String command,
                              DataInputStream params,
                              IOTACommandHelper helper)
Description copied from interface: IOTACommand
Attempt to process a command.

Specified by:
processCommand in interface IOTACommand
Parameters:
command - the command that was invoked
params - a DataInputStream from which the command's parameters can be read
helper - infrastructure-supplied source of command helper operations
Returns:
false if the SPOT admin command processor should closedown as a result of this command being run, otherwise true. Return true even when the command failed.

SunSPOT API V3.0


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