JMACS

org.jmacs.pd
Class ProxyDevice

java.lang.Object
  extended by org.jmacs.pd.ProxyDevice
All Implemented Interfaces:
IDevice

public class ProxyDevice
extends Object
implements IDevice

IDevice impl'n to be extended by all programmable-device definitions.

Version:
$Id: ProxyDevice.java 754 2006-07-13 08:44:22Z rob $
Author:
Rob Dickens

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jmacs.pd.IDevice
IDevice.IConstants, IDevice.IDriver, IDevice.IStatus
 
Field Summary
 
Fields inherited from interface org.jmacs.pd.IDevice
STOP_PROGRAM
 
Constructor Summary
protected ProxyDevice(IDiDriver.IContext.IFull context)
          creates new instance.
  ProxyDevice(IDiDriver.IContext.IFull context, String diName)
          creates new instance.
 
Method Summary
protected  Object createProxyDriver(Class driverInterface)
          for use to provide access to driver itself in the form of a dynamic proxy.
 Serializable executeCmd(Serializable cmd)
          impl'ts superclass.
 IProgInfo getProgInfo()
          impl'ts superclass.
 Serializable getStatus()
          impl'ts superclass.
 IStatusEtc getStatusEtc()
          impl'ts superclass.
 void startProgram(IProgram prog)
          impl'ts superclass.
 void stopProgram()
          impl'ts superclass.
 void subscribe(boolean b)
          impl'ts superclass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyDevice

public ProxyDevice(IDiDriver.IContext.IFull context,
                   String diName)
creates new instance.

Parameters:
diName - See IDiDriver.IContext.

ProxyDevice

protected ProxyDevice(IDiDriver.IContext.IFull context)
creates new instance. As above, using diName derived from classname: e.g. MyDevice results in a diName of ".myDevice".

Method Detail

executeCmd

public Serializable executeCmd(Serializable cmd)
                        throws DiDriverException,
                               ClientDiException
impl'ts superclass.

Specified by:
executeCmd in interface IDevice
Throws:
DiDriverException
ClientDiException

startProgram

public void startProgram(IProgram prog)
                  throws ClientDiException
impl'ts superclass.

Specified by:
startProgram in interface IDevice
Throws:
ClientDiException

stopProgram

public void stopProgram()
                 throws ClientDiException
impl'ts superclass.

Specified by:
stopProgram in interface IDevice
Throws:
ClientDiException

getStatus

public Serializable getStatus()
                       throws ClientDiException
impl'ts superclass.

Specified by:
getStatus in interface IDevice
Throws:
ClientDiException

getProgInfo

public IProgInfo getProgInfo()
                      throws ClientDiException
impl'ts superclass.

Specified by:
getProgInfo in interface IDevice
Throws:
ClientDiException

getStatusEtc

public IStatusEtc getStatusEtc()
                        throws ClientDiException
impl'ts superclass.

Specified by:
getStatusEtc in interface IDevice
Throws:
ClientDiException

subscribe

public void subscribe(boolean b)
               throws ClientDiException
impl'ts superclass.

Specified by:
subscribe in interface IDevice
Throws:
ClientDiException

createProxyDriver

protected Object createProxyDriver(Class driverInterface)
for use to provide access to driver itself in the form of a dynamic proxy. The result should be cast to driverInterface, and typically assigned to a private field, to be accessed via a public getDriver() method.


JMACS

jmacs.org