com.cosylab.epics.caj
Class CAJMonitor

java.lang.Object
  extended by gov.aps.jca.Monitor
      extended by com.cosylab.epics.caj.CAJMonitor
All Implemented Interfaces:
gov.aps.jca.event.MonitorListener, EventListener

public class CAJMonitor
extends gov.aps.jca.Monitor
implements gov.aps.jca.event.MonitorListener

Implementation of CAJ JCA Monitor.

Version:
$id$
Author:
Matej Sekoranja

Field Summary
protected  CAJChannel channel
          Monitored channel.
protected  boolean cleared
          Cleared flag.
protected  CAJContext context
          Context.
protected  int count
          Number of elements (size of array) of monitored value type.
protected  EventAddRequest eventAddRequest
          Event add request.
protected  ArrayList listeners
          Monitor listeners.
protected  int mask
          Monitor mask.
protected  int subsid
          Subscription ID.
protected  gov.aps.jca.dbr.DBRType type
          Monitored value type.
 
Fields inherited from class gov.aps.jca.Monitor
ALARM, LOG, PROPERTY, VALUE
 
Constructor Summary
CAJMonitor(CAJContext context, gov.aps.jca.dbr.DBRType type, int count, CAJChannel channel, gov.aps.jca.event.MonitorListener listener, int mask)
          Constructor.
 
Method Summary
 void addMonitorListener(gov.aps.jca.event.MonitorListener l)
           
 void clear()
           
 gov.aps.jca.Channel getChannel()
           
 gov.aps.jca.Context getContext()
           
 int getCount()
           
 int getMask()
           
 gov.aps.jca.event.MonitorListener getMonitorListener()
           
 gov.aps.jca.event.MonitorListener[] getMonitorListeners()
           
 int getSID()
          Get this monitor subscription ID.
 gov.aps.jca.dbr.DBRType getType()
           
 boolean isCleared()
          Get cleared flag.
 void monitorChanged(gov.aps.jca.event.MonitorEvent ev)
           
 void removeMonitorListener(gov.aps.jca.event.MonitorListener l)
           
 
Methods inherited from class gov.aps.jca.Monitor
isMonitoringAlarm, isMonitoringLog, isMonitoringProperty, isMonitoringValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected CAJContext context
Context.


type

protected gov.aps.jca.dbr.DBRType type
Monitored value type.


count

protected int count
Number of elements (size of array) of monitored value type.


channel

protected CAJChannel channel
Monitored channel.


eventAddRequest

protected EventAddRequest eventAddRequest
Event add request.


mask

protected int mask
Monitor mask.


listeners

protected ArrayList listeners
Monitor listeners.


subsid

protected int subsid
Subscription ID.


cleared

protected volatile boolean cleared
Cleared flag.

Constructor Detail

CAJMonitor

public CAJMonitor(CAJContext context,
                  gov.aps.jca.dbr.DBRType type,
                  int count,
                  CAJChannel channel,
                  gov.aps.jca.event.MonitorListener listener,
                  int mask)
           throws gov.aps.jca.CAException
Constructor.

Parameters:
context -
type -
count -
channel -
listener -
mask -
Throws:
gov.aps.jca.CAException
Method Detail

clear

public void clear()
           throws gov.aps.jca.CAException
Specified by:
clear in class gov.aps.jca.Monitor
Throws:
gov.aps.jca.CAException
See Also:
Monitor.clear()

getContext

public gov.aps.jca.Context getContext()
Specified by:
getContext in class gov.aps.jca.Monitor
See Also:
Monitor.getContext()

getChannel

public gov.aps.jca.Channel getChannel()
Specified by:
getChannel in class gov.aps.jca.Monitor
See Also:
Monitor.getChannel()

getType

public gov.aps.jca.dbr.DBRType getType()
Specified by:
getType in class gov.aps.jca.Monitor
See Also:
Monitor.getType()

getCount

public int getCount()
Specified by:
getCount in class gov.aps.jca.Monitor
See Also:
Monitor.getCount()

getMask

public int getMask()
Specified by:
getMask in class gov.aps.jca.Monitor
See Also:
Monitor.getMask()

getMonitorListener

public gov.aps.jca.event.MonitorListener getMonitorListener()
Specified by:
getMonitorListener in class gov.aps.jca.Monitor
See Also:
Monitor.getMonitorListener()

addMonitorListener

public void addMonitorListener(gov.aps.jca.event.MonitorListener l)
Specified by:
addMonitorListener in class gov.aps.jca.Monitor
See Also:
Monitor.addMonitorListener(gov.aps.jca.event.MonitorListener)

removeMonitorListener

public void removeMonitorListener(gov.aps.jca.event.MonitorListener l)
Specified by:
removeMonitorListener in class gov.aps.jca.Monitor
See Also:
Monitor.removeMonitorListener(gov.aps.jca.event.MonitorListener)

getMonitorListeners

public gov.aps.jca.event.MonitorListener[] getMonitorListeners()
Specified by:
getMonitorListeners in class gov.aps.jca.Monitor
See Also:
Monitor.getMonitorListeners()

monitorChanged

public void monitorChanged(gov.aps.jca.event.MonitorEvent ev)
Specified by:
monitorChanged in interface gov.aps.jca.event.MonitorListener
See Also:
MonitorListener.monitorChanged(gov.aps.jca.event.MonitorEvent)

getSID

public int getSID()
Get this monitor subscription ID.

Returns:
monitor subscription ID

isCleared

public boolean isCleared()
Get cleared flag.

Returns:
cleared flag.


Copyright © 2004-2013 Cosylab. All Rights Reserved.