com.buglabs.bug.module.vonhippel
Class VonHippelModlet

java.lang.Object
  extended by com.buglabs.bug.module.vonhippel.VonHippelModlet
All Implemented Interfaces:
IModlet, IModuleControl

public class VonHippelModlet
extends java.lang.Object
implements IModlet, IModuleControl


Field Summary
static java.lang.String MODULE_ID
           
protected static java.lang.String PROPERTY_MODULE_NAME
           
 
Constructor Summary
VonHippelModlet(BundleContext context, int slotId, java.lang.String moduleId, java.lang.String moduleName)
           
VonHippelModlet(BundleContext context, int slotId, java.lang.String moduleId, java.lang.String moduleName, BMIModuleProperties properties)
           
 
Method Summary
 java.lang.String getModuleId()
          Return the MODULE ID.
 java.lang.String getModuleName()
          Get the human-readable name of this module.
 java.util.List getModuleProperties()
          Return a list of IModuleProperty elements.
 int getSlotId()
           
 int resume()
          Resume the module.
 boolean setModuleProperty(IModuleProperty property)
          Set a property.
 void setup()
          Connect to any devices or do any initialization.
 void start()
          Begin modlet.
 void stop()
          Unregister services and release any resources.
 int suspend()
          Suspend the module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_MODULE_NAME

protected static final java.lang.String PROPERTY_MODULE_NAME
See Also:
Constant Field Values

MODULE_ID

public static final java.lang.String MODULE_ID
See Also:
Constant Field Values
Constructor Detail

VonHippelModlet

public VonHippelModlet(BundleContext context,
                       int slotId,
                       java.lang.String moduleId,
                       java.lang.String moduleName)

VonHippelModlet

public VonHippelModlet(BundleContext context,
                       int slotId,
                       java.lang.String moduleId,
                       java.lang.String moduleName,
                       BMIModuleProperties properties)
Method Detail

start

public void start()
           throws java.lang.Exception
Description copied from interface: IModlet
Begin modlet. Any services that the modlet supports should be registered here.

Specified by:
start in interface IModlet
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Description copied from interface: IModlet
Unregister services and release any resources.

Specified by:
stop in interface IModlet
Throws:
java.lang.Exception

getModuleProperties

public java.util.List getModuleProperties()
Description copied from interface: IModuleControl
Return a list of IModuleProperty elements.

Specified by:
getModuleProperties in interface IModuleControl
Returns:

setModuleProperty

public boolean setModuleProperty(IModuleProperty property)
Description copied from interface: IModuleControl
Set a property. This is from a client request.

Specified by:
setModuleProperty in interface IModuleControl
Returns:

getModuleName

public java.lang.String getModuleName()
Description copied from interface: IModuleControl
Get the human-readable name of this module.

Specified by:
getModuleName in interface IModuleControl
Returns:

getModuleId

public java.lang.String getModuleId()
Description copied from interface: IModlet
Return the MODULE ID. This comes from the hardware.

Specified by:
getModuleId in interface IModlet
Returns:

getSlotId

public int getSlotId()
Specified by:
getSlotId in interface IModlet
Specified by:
getSlotId in interface IModuleControl
Returns:
Slot that the Module is currently connected to.

resume

public int resume()
           throws java.io.IOException
Description copied from interface: IModuleControl
Resume the module.

Specified by:
resume in interface IModuleControl
Throws:
java.io.IOException

suspend

public int suspend()
            throws java.io.IOException
Description copied from interface: IModuleControl
Suspend the module.

Specified by:
suspend in interface IModuleControl
Throws:
java.io.IOException

setup

public void setup()
           throws java.lang.Exception
Description copied from interface: IModlet
Connect to any devices or do any initialization. This is a good place to throw an exception if the expected hardware environment is not valid.

Specified by:
setup in interface IModlet
Throws:
java.lang.Exception