JMACS

org.jmacs.pd
Class DiClient

java.lang.Object
  extended by org.jmacs.pd.DiClient
All Implemented Interfaces:
IDiClient

public class DiClient
extends Object
implements IDiClient

IDiClient for the deployment of programmable devices.

The IMonitorGui and IControlsGui named MonitorGui and ControlsGui respectively in the package named by the org.jmacs.pd.uiPkgname property (whose default value is com.lafros.jmacs.pd.ui) will be used. These should allow interactive monitoring and control of programs, and have nested in them any corresponding classes supplied as part of the device definition.

See DiClients for details of how to set properties.

See package description for device definition details.

Version:
$Id: DiClient.java 828 2006-07-15 19:19:20Z rob $
Author:
Rob Dickens

Constructor Summary
DiClient(String diName, String devicePkgname, IDevice.IDriver.IContainer driverContainer, IDevice.IConstants constants)
          creates new instance.
DiClient(String diName, String devicePkgname, IDevice.IDriver.IContainer driverContainer, Object diDriverLock, IDevice.IConstants constants)
          creates new instance.
DiClient(String diName, String devicePkgname, IDevice.IDriver driver, IDevice.IConstants constants)
          creates new instance.
DiClient(String diName, String devicePkgname, IDevice.IDriver driver, Object diDriverLock, IDevice.IConstants constants)
          creates new instance.
DiClient(String diName, String devicePkgname, String classname, IDevice.IConstants constants)
          creates new instance.
 
Method Summary
 void connect()
          impl'ts IDiClient.
 void connect(int ucastPort)
          impl'ts IDiClient.
 void connect(int ucastPort, int ucastSubscriberPort)
          impl'ts IDiClient.
 void disconnect()
          impl'ts IDiClient.
 void terminate()
          impl'ts IDiClient.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiClient

public DiClient(String diName,
                String devicePkgname,
                String classname,
                IDevice.IConstants constants)
         throws ClassNotFoundException,
                InterruptedException,
                IOException
creates new instance.

Parameters:
diName - See ISpi.
devicePkgname - See package description.
classname - fully-qualified name of the class impl'ting either the IDevice.IDriver or IDevice.IDriver.IContainer. In the case of the former, the constructor takes the following OPTIONAL arguments, in the following order:
  1. IDiDriver.IContext.ISubscribeOnly subscriberContext
  2. IDiDriver.IContext.IControlOnly controllerContext
  3. Object constants (as supplied here).
In the case of the latter, the constructor takes only the last of these, contexts being instead supplied according to which of IDiDriver.IClient.ISubscribeOnly, IDiDriver.IClient.IControlOnly or IDiDriver.IClient.IFull are impl'ted.
constants - passed to classname and GUI constructors if non-null, and to IInterpreter.interpretCmd() and IPrograms.
Throws:
IllegalArgumentException - if classname does not impl't the prescribed interfaces
ClassNotFoundException
InterruptedException
IOException

DiClient

public DiClient(String diName,
                String devicePkgname,
                IDevice.IDriver driver,
                IDevice.IConstants constants)
         throws InterruptedException,
                IOException
creates new instance.

Parameters:
driver - The caller undertakes not to access this subsequently.
Throws:
InterruptedException
IOException

DiClient

public DiClient(String diName,
                String devicePkgname,
                IDevice.IDriver driver,
                Object diDriverLock,
                IDevice.IConstants constants)
         throws InterruptedException,
                IOException
creates new instance.

Parameters:
diDriverLock - to be acquired whenever accessing driver subsequently
Throws:
InterruptedException
IOException

DiClient

public DiClient(String diName,
                String devicePkgname,
                IDevice.IDriver.IContainer driverContainer,
                IDevice.IConstants constants)
         throws InterruptedException,
                IOException
creates new instance.

Parameters:
driverContainer - The caller undertakes not to access this subsequently.
Throws:
InterruptedException
IOException

DiClient

public DiClient(String diName,
                String devicePkgname,
                IDevice.IDriver.IContainer driverContainer,
                Object diDriverLock,
                IDevice.IConstants constants)
         throws InterruptedException,
                IOException
creates new instance.

Parameters:
diDriverLock - to be acquired whenever accessing driverContainer subsequently
Throws:
InterruptedException
IOException
Method Detail

connect

public void connect()
             throws InterruptedException,
                    MalformedURLException,
                    RemoteException
impl'ts IDiClient.

Specified by:
connect in interface IDiClient
Throws:
InterruptedException
MalformedURLException
RemoteException

connect

public void connect(int ucastPort)
             throws InterruptedException,
                    MalformedURLException,
                    RemoteException
impl'ts IDiClient.

Specified by:
connect in interface IDiClient
Throws:
InterruptedException
MalformedURLException
RemoteException

connect

public void connect(int ucastPort,
                    int ucastSubscriberPort)
             throws InterruptedException,
                    MalformedURLException,
                    RemoteException
impl'ts IDiClient.

Specified by:
connect in interface IDiClient
Throws:
InterruptedException
MalformedURLException
RemoteException

disconnect

public void disconnect()
impl'ts IDiClient.

Specified by:
disconnect in interface IDiClient

terminate

public void terminate()
               throws IOException
impl'ts IDiClient.

Specified by:
terminate in interface IDiClient
Throws:
IOException

JMACS

jmacs.org