|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.MonitoredItemBase
com.prosysopc.ua.server.MonitoredItem
com.prosysopc.ua.server.MonitoredEventItem
public class MonitoredEventItem
A monitored item for event monitoring, in the server side.
| Field Summary | |
|---|---|
protected EventListener |
eventListener
|
| Fields inherited from class com.prosysopc.ua.server.MonitoredItem |
|---|
links, node, subscription |
| Fields inherited from class com.prosysopc.ua.MonitoredItemBase |
|---|
attributeId, clientHandle, dataEncoding, discardOldest, maxQueueSize, monitoredItemId, monitoringMode, nodeId, queueSize |
| Constructor Summary | |
|---|---|
MonitoredEventItem(ServiceContext serviceContext,
Subscription subscription,
org.opcfoundation.ua.builtintypes.UnsignedInteger monitoredItemId,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.core.EventFilter filter,
org.opcfoundation.ua.core.EventFilterResult filterResult)
|
|
| Method Summary | |
|---|---|
boolean |
filter(EventData eventData)
Checks if an event occurrence is filtered by the current EventFilter. |
Boolean |
filter(EventData eventData,
Boolean defaultResult)
Checks if an event occurrence is filtered by the current EventFilter. |
int |
getCurrentQueueSize()
Current number of items in the event queue. |
protected long |
getDefaultQueueSize()
|
org.opcfoundation.ua.core.EventFilter |
getEventFilter()
|
org.opcfoundation.ua.core.EventFilterResult |
getEventFilterResult()
|
protected void |
getEvents(List<org.opcfoundation.ua.core.EventFieldList> events)
|
static int |
getMaxQueueSize()
Deprecated. Use MonitoredItem.getMaxQueueSize() |
protected NodeManagerRoot |
getNodeManagerRoot()
|
boolean |
isMonitored(UaNode event)
|
void |
notifyEvent(EventData eventData)
Send an event notification to the client via the monitored item. |
void |
notifyEvent(EventData eventData,
boolean applyFilter)
Send an event notification to the client via the monitored item. |
void |
onEvent(UaNode node,
EventData eventData)
Deprecated. use notifyEvent(EventData) instead. |
protected void |
plugNodeListener()
|
protected void |
setEventFilter(org.opcfoundation.ua.core.EventFilter eventFilter)
|
protected void |
setEventFilterResult(org.opcfoundation.ua.core.EventFilterResult eventFilterResult)
|
static void |
setMaxQueueSize(int maxQueueSize)
Deprecated. Use MonitoredItem.setMaxQueueSize(int) |
protected void |
unPlugNodeListener()
|
protected void |
updateFilter()
React to changes in the filter. |
protected void |
updateQueue()
Update the queue, when it's size has changed. |
| Methods inherited from class com.prosysopc.ua.server.MonitoredItem |
|---|
addLink, close, equals, getNode, getServiceContext, getSubscription, getTimestampsToReturn, hashCode, monitoringModeChanged, removeLink, setClientHandle, setFilter, setFilterResult, setNode, setServiceContext, setTimestampsToReturn |
| Methods inherited from class com.prosysopc.ua.MonitoredItemBase |
|---|
getAttributeId, getClientHandle, getDataEncoding, getFilter, getFilterResult, getIndexRange, getMonitoredItemId, getMonitoringMode, getNodeId, getQueueSize, getSamplingInterval, isDiscardOldest, setDiscardOldest, setMonitoredItemId, setMonitoringMode, setQueueSize, setQueueSize, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected EventListener eventListener
| Constructor Detail |
|---|
public MonitoredEventItem(ServiceContext serviceContext,
Subscription subscription,
org.opcfoundation.ua.builtintypes.UnsignedInteger monitoredItemId,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.core.EventFilter filter,
org.opcfoundation.ua.core.EventFilterResult filterResult)
throws StatusException
subscription - monitoredItemId - nodeId - filter - filterResult -
StatusException - if the filter is not valid| Method Detail |
|---|
@Deprecated public static int getMaxQueueSize()
MonitoredItem.getMaxQueueSize()
@Deprecated public static void setMaxQueueSize(int maxQueueSize)
MonitoredItem.setMaxQueueSize(int)
Default: 1000000
maxQueueSize - the maxQueueSize to set, must be bigger than 0public boolean filter(EventData eventData)
The method evaluates the whereClause of the EventFilter using the provided eventData.
eventData - The event data structure that is being checked. Only the fields that are
defined in the EventData are checked.
public Boolean filter(EventData eventData,
Boolean defaultResult)
The method evaluates the whereClause of the EventFilter using the provided eventData.
eventData - The event data structure that is being checked. Only the fields that are
defined in the EventData are checked.defaultResult - the result in case the whereClause of the filter evaluates to null, due to
missing fields or fields that have value null.
public int getCurrentQueueSize()
public org.opcfoundation.ua.core.EventFilter getEventFilter()
public org.opcfoundation.ua.core.EventFilterResult getEventFilterResult()
public boolean isMonitored(UaNode event)
public void notifyEvent(EventData eventData)
This method is used for non-UaNode items from your application to send a new event notification for the monitored item. UaNode-based items will monitor the nodes and send events automatically.
The event will be checked against the filter defined by the client to determine if it really needs to be sent.
eventData - values of the event fields to send
public void notifyEvent(EventData eventData,
boolean applyFilter)
This method is used for non-UaNode items from your application to send a new event notification for the monitored item. UaNode-based items will monitor the nodes and send events automatically.
The event will be checked against the filter defined by the client to determine if it really needs to be sent, unless applyFilter is false.
eventData - values of the event fields to sendapplyFilter - if true, the normal filter will be applied. Provide false, to omit the
filtering. Used for RefreshStart and RefreshEnd events. Default is true.
@Deprecated
public void onEvent(UaNode node,
EventData eventData)
notifyEvent(EventData) instead.
This method is used for non-UaNode items from your application to send a new event notification for the monitored item. UaNode-based items will monitor the nodes and send events automatically.
The event will be checked against the filter defined by the client to determine if it really needs to be sent.
node - not usedeventData - values of the event fields to sendprotected long getDefaultQueueSize()
getDefaultQueueSize in class MonitoredItemBaseprotected void getEvents(List<org.opcfoundation.ua.core.EventFieldList> events)
events - protected NodeManagerRoot getNodeManagerRoot()
protected void plugNodeListener()
plugNodeListener in class MonitoredItem
protected final void setEventFilter(org.opcfoundation.ua.core.EventFilter eventFilter)
throws ServiceException
ServiceExceptionprotected void setEventFilterResult(org.opcfoundation.ua.core.EventFilterResult eventFilterResult)
eventFilterResult - the eventFilterResult to setprotected void unPlugNodeListener()
unPlugNodeListener in class MonitoredItemprotected void updateFilter()
MonitoredItemBase
updateFilter in class MonitoredItemBaseprotected void updateQueue()
updateQueue in class MonitoredItemBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||