Scala Monitoring and Control System API
com.lafros.macs

class Di

[source: com/lafros/macs/Di.scala]

abstract class Di
extends Subject
MaCS device-interface (DI). Having created an instance (using the methods of your Di.Factory.instance), deployment code may then manage it using the API shown below. Registering the DI allows it to participate as a node in a logical hierarchy (determined when the Di is created), which may be distributed over a local or wide area network.
Author
Rob Dickens
Direct Known Subclasses:
dummy.StatuslessDi, dummy.Di

Value Summary
var autoReregister : Boolean
automatic re-registration (in case the target should become unavailable for any reason). The default setting is true.
Method Summary
abstract def register : Unit
registers with the target.
abstract def registerLater : Unit
as for register(), but guaranteed to return, immediately.
abstract def registerOrWait : Unit
as for register(), but enters a sleep-retry loop if the target is unavailable (rather than throwing an exception).
abstract def setSamplesInPort (port : Int) : Unit
sets a designated local port to which the socket that will be created to receive subscription status samples must bind.
abstract def setSamplesOutPort (port : Int) : Unit
sets a designated local port to which the socket that will be created to send status samples must bind.
abstract def state : scala.Enumeration.Value
returns one of the possible Di.States.
abstract def unregister : Unit
return the instance to the unregistered state. (Instances are required to be in this state when being discarded.)
Methods inherited from Subject
subscribe, publish
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
var autoReregister : Boolean
automatic re-registration (in case the target should become unavailable for any reason). The default setting is true.

Method Details
abstract def setSamplesOutPort(port : Int) : Unit
sets a designated local port to which the socket that will be created to send status samples must bind.
Throws
IllegalStateException - if called when not unbound

abstract def setSamplesInPort(port : Int) : Unit
sets a designated local port to which the socket that will be created to receive subscription status samples must bind.
Throws
IllegalStateException - if called when not unbound

abstract def register : Unit
registers with the target.
Throws
DiNameTakenException - if another DI is already registered under the same name
TargetUnavailableException - if the target DI-registry is unavailable

abstract def registerOrWait : Unit
as for register(), but enters a sleep-retry loop if the target is unavailable (rather than throwing an exception).
Throws
InterruptedException - if interrupted while sleeping
DiNameTakenException - if another DI is already registered under the same name

abstract def registerLater : Unit
as for register(), but guaranteed to return, immediately.

abstract def unregister : Unit
return the instance to the unregistered state. (Instances are required to be in this state when being discarded.)

abstract def state : scala.Enumeration.Value
returns one of the possible Di.States.


Copyright 2009 Latterfrosken Software Development Limited