ist.palcom.eclipse.browserplugin
Class EclipseBrowserDevice

java.lang.Object
  extended by ist.palcom.device.AbstractDevice
      extended by ist.palcom.device.AbstractUDPDevice
          extended by ist.palcom.eclipse.browserplugin.EclipseBrowserDevice
All Implemented Interfaces:
java.lang.Runnable

public class EclipseBrowserDevice
extends AbstractUDPDevice

A simple Palcom device class responsible for the discovery and remote control functionality needed by the Palcom browser application.


Field Summary
protected  DeviceAndServiceListener dsl
           
 
Fields inherited from class ist.palcom.device.AbstractDevice
context, scheduler
 
Constructor Summary
EclipseBrowserDevice(DeviceID deviceID, java.lang.String name, DeviceAndServiceListener dsl, java.io.File root)
           
 
Method Summary
protected  DeviceContext createDeviceContext(DeviceID deviceID, PalcomScheduler scheduler)
          Creates the DeviceContext of the device.
 void doRediscover()
           
 void doRequestConnection(ConnectionInfo info)
           
 void doRequestDisconnection(ConnectionInfo info)
           
 PRDService getControlCustomer()
           
 ServiceInstanceID getControlCustomerSIID()
           
 void initDevice()
          Initialize the device.
 void listenForStatusChanges(AbstractResourceAddress address)
           
 void loadAssembly(PRDAssemblyVer av)
          Short-cut method to allow loading of assemblies from the "native" user interface of the device
 void loadSoftwareComponent(java.lang.String className, java.lang.String instanceString)
           
 void putUpdateEvent(AssemblyEditor editor, IFile resource)
           
 void removeAssemblies()
          Short-cut method to allow unloading of assemblies from the "native" user interface of the device
 void safePutEvent(CommandEvent e)
           
 void scheduleThread(PalcomThread t)
           
 void stopDevice()
          Stop the device.
 void testEditThread()
           
 
Methods inherited from class ist.palcom.device.AbstractDevice
getDeviceContext, getDeviceInfo, getName, getRootPath, run, safePutEvent, setHeartBeatPeriod, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dsl

protected DeviceAndServiceListener dsl
Constructor Detail

EclipseBrowserDevice

public EclipseBrowserDevice(DeviceID deviceID,
                            java.lang.String name,
                            DeviceAndServiceListener dsl,
                            java.io.File root)
                     throws java.io.IOException
Parameters:
deviceID -
name -
root - - the root of the Eclipse workspace we are currently running in
Throws:
java.io.IOException
Method Detail

createDeviceContext

protected DeviceContext createDeviceContext(DeviceID deviceID,
                                            PalcomScheduler scheduler)
Description copied from class: AbstractDevice
Creates the DeviceContext of the device. This method has to be implemented in a concrete subclass.

Overrides:
createDeviceContext in class AbstractUDPDevice
Parameters:
deviceID - The device ID.
scheduler - The scheduler.
Returns:
The DeviceContext

safePutEvent

public void safePutEvent(CommandEvent e)

doRequestConnection

public void doRequestConnection(ConnectionInfo info)

doRequestDisconnection

public void doRequestDisconnection(ConnectionInfo info)

doRediscover

public void doRediscover()

initDevice

public void initDevice()
                throws java.io.IOException
Description copied from class: AbstractDevice
Initialize the device. Called from a PalcomThread. Here the actual setup is done. Subclasses override this method, and call super.initDevice from there.

Overrides:
initDevice in class AbstractDevice
Throws:
java.io.IOException

stopDevice

public void stopDevice()
                throws java.io.IOException
Description copied from class: AbstractDevice
Stop the device. Called from a PalcomThread. Here the actual cleanup is done. Subclasses override this method, and call super.stopDevice from there.

Overrides:
stopDevice in class AbstractDevice
Throws:
java.io.IOException

getControlCustomerSIID

public ServiceInstanceID getControlCustomerSIID()

getControlCustomer

public PRDService getControlCustomer()

scheduleThread

public void scheduleThread(PalcomThread t)

loadSoftwareComponent

public void loadSoftwareComponent(java.lang.String className,
                                  java.lang.String instanceString)

loadAssembly

public void loadAssembly(PRDAssemblyVer av)
Short-cut method to allow loading of assemblies from the "native" user interface of the device


removeAssemblies

public void removeAssemblies()
Short-cut method to allow unloading of assemblies from the "native" user interface of the device


putUpdateEvent

public void putUpdateEvent(AssemblyEditor editor,
                           IFile resource)

testEditThread

public void testEditThread()

listenForStatusChanges

public void listenForStatusChanges(AbstractResourceAddress address)