|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcern.cmw.rda.server.DeviceServerBase
cern.cmw.rda.examples.DeviceServer
public class DeviceServer
Field Summary |
---|
Fields inherited from class cern.cmw.rda.server.DeviceServerBase |
---|
STATUS_GREEN, STATUS_RED, STATUS_YELLOW |
Method Summary | |
---|---|
Data |
get(IOPoint iop,
Data context)
Delegates the get call to a NoiseGenerator specified by the iop argument. |
Data |
getState()
This method gets called when an administration client invokes the getState method of the
admin::ServerAdmin interface. |
int |
getStatus()
This method gets called when an administration client invokes the getStatus method of
the admin::ServerAdmin interface. |
static void |
main(String[] args)
Creates and starts a DeviceServer. |
void |
monitorOff(IOPoint iop,
ValueChangeListener listener)
Delegates the monitorOff call to a NoiseGenerator specified by the iop argument. |
void |
monitorOn(IOPoint iop,
ValueChangeListener listener)
Delegates the monitorOn call to a NoiseGenerator specified by the iop argument. |
void |
run()
|
void |
set(IOPoint iop,
Data value,
Data context)
Delegates the set call to a NoiseGenerator specified by the iop argument. |
Methods inherited from class cern.cmw.rda.server.DeviceServerBase |
---|
getCallsLogger, getClassName, getGlobalLogger, getServerName, getSubscriptionsLogger, getVersion, runServer, shutDown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Data get(IOPoint iop, Data context) throws BadParameter, IOError
get
in class DeviceServerBase
iop
- the I/O point identifiercontext
- the operation context, if specified in the client call, or an empty Data
object otherwise.
BadParameter
- if there is no such device in the server or if the device get
method raises this exception
IOError
- if the device get method raises an IOError exceptionNoiseGenerator.get(IOPoint, Data)
public void set(IOPoint iop, Data value, Data context) throws BadParameter, IOError
set
in class DeviceServerBase
iop
- the I/O point identifiervalue
- the value to setcontext
- the operation context, if specified in the client call, or an empty Data
object otherwise.
BadParameter
- if there is no such device in the server or if the device set
method raises this exception
IOError
- if the device set method raises an IOError exceptionNoiseGenerator.set(IOPoint, Data, Data)
public void monitorOn(IOPoint iop, ValueChangeListener listener) throws BadParameter
monitorOn
in class DeviceServerBase
iop
- the I/O point identifierlistener
- the callback object where to deliver subscription results.
BadParameter
- if there is no such device in the server or if the device
monitorOn method raises this exceptionNoiseGenerator.monitorOn(IOPoint, ValueChangeListener)
public void monitorOff(IOPoint iop, ValueChangeListener listener)
monitorOff
in class DeviceServerBase
NoiseGenerator.monitorOff(IOPoint, ValueChangeListener)
public Data getState()
DeviceServerBase
getState
method of the
admin::ServerAdmin interface.
The default implementation of the method in this class returns a Data
object which contains state variables of the RDA server. If you want
to add some information to the state data, first get the RDA server
state by calling the superclass' method, then add to it your state
variables. For example:
class MyServer extends DeviceServerBase
{
...
private double delay;
private long counter;
public Data getState()
{
//
// Get the RDA server state
//
Data state = super.getState();
//
// Add MyServer variables to the state data
//
state.insert("my.delay", delay);
state.insert("my.counter", counter);
return state;
}
...
};
getState
in class DeviceServerBase
public int getStatus()
DeviceServerBase
getStatus
method of
the admin::ServerAdmin interface.
The default implementation of the method in this class returns
getStatus in class DeviceServerBase
public void run()
run
in interface Runnable
public static void main(String[] args) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |