|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectist.palcom.simulated.device.factory.AbstractDeviceFactory
public abstract class AbstractDeviceFactory
Abstract base class for a factory that can create simulated devices with persistent identities (identities that survive computer reboots).
There is a static method createAndStart(Class)
for creating and starting a new device.
| Constructor Summary | |
|---|---|
AbstractDeviceFactory(java.net.URL classNameURL)
|
|
| Method Summary | |
|---|---|
void |
addDeviceToScenario(DeviceID deviceID,
java.lang.String scenarioName)
Adds the device to the scenario. |
static void |
createAndStart(java.lang.Class deviceType)
|
void |
createAndStartDevice(DeviceID deviceID,
java.lang.String name,
java.lang.String deviceType)
Starts a new device with a given device ID, name and type. |
void |
createAndStartNewDevice(java.lang.String deviceType)
Starts a new device with a given type and a random name and device ID. |
void |
createDevice(DeviceDescriptor descriptor)
Creates a device, without starting it. |
void |
createScenario(java.lang.String name)
|
void |
deleteDevice(DeviceID deviceID)
|
void |
deleteScenario(java.lang.String name)
|
boolean |
deviceIsRunning(DeviceID deviceID)
|
DeviceDescriptor |
getDeviceDescriptor(DeviceID deviceID)
|
DeviceDescriptor |
getDeviceDescriptor(int index)
|
int |
getDeviceDescriptorIndex(DeviceID deviceID)
|
java.util.List<java.lang.String> |
getDeviceGUIClassNames()
|
java.util.Iterator<DeviceID> |
getDeviceIDIterator(java.lang.String scenarioName)
|
DeviceID |
getNewDeviceID()
|
int |
getNumberOfDevices()
|
int |
getNumberOfScenarios()
|
java.lang.String |
getScenarioName(int index)
|
void |
removeDeviceFromScenario(DeviceID deviceID,
java.lang.String scenarioName)
|
boolean |
scenarioExists(java.lang.String name)
|
SimulatedDeviceGUI |
startDevice(DeviceID deviceID)
Start the device with ID deviceID, if it exists and if it is not already running. |
void |
stopDevice(DeviceID deviceID)
Stop the device with ID deviceID, if it is running. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDeviceFactory(java.net.URL classNameURL)
classNameURL - URL to resource where device GUI class names can be read.| Method Detail |
|---|
public static void createAndStart(java.lang.Class deviceType)
throws DeviceFactoryException
DeviceFactoryExceptionpublic boolean scenarioExists(java.lang.String name)
public void createScenario(java.lang.String name)
public void deleteScenario(java.lang.String name)
public void addDeviceToScenario(DeviceID deviceID,
java.lang.String scenarioName)
public void removeDeviceFromScenario(DeviceID deviceID,
java.lang.String scenarioName)
public int getNumberOfScenarios()
public java.lang.String getScenarioName(int index)
public java.util.Iterator<DeviceID> getDeviceIDIterator(java.lang.String scenarioName)
public int getNumberOfDevices()
public int getDeviceDescriptorIndex(DeviceID deviceID)
public DeviceDescriptor getDeviceDescriptor(int index)
public DeviceDescriptor getDeviceDescriptor(DeviceID deviceID)
public DeviceID getNewDeviceID()
public void createDevice(DeviceDescriptor descriptor)
public java.util.List<java.lang.String> getDeviceGUIClassNames()
throws java.io.IOException
java.io.IOException
public void deleteDevice(DeviceID deviceID)
throws java.io.IOException
java.io.IOException
public SimulatedDeviceGUI startDevice(DeviceID deviceID)
throws DeviceFactoryException
DeviceFactoryException - if the device cannot be started, e.g. if the stored GUI type
is wrong.
public void createAndStartNewDevice(java.lang.String deviceType)
throws DeviceFactoryException
DeviceFactoryException - if the device cannot be started.
public void createAndStartDevice(DeviceID deviceID,
java.lang.String name,
java.lang.String deviceType)
throws DeviceFactoryException
DeviceFactoryException - if the device cannot be started.
public void stopDevice(DeviceID deviceID)
throws java.io.IOException
java.io.IOExceptionpublic boolean deviceIsRunning(DeviceID deviceID)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||