

13:43, EEST

January 27, 2012

I figured out that whenever an Event is subscribed, also a RefreshStartEvent and a RefreshEndEvent is triggered by the client.
When there is a need to provide fields in these System Events (e.g. NodeId, Stamp, …), how will a Listener for these events look like? Is there a method in an EventListener to hook in or do I need to implement such listener on top of all NodeManagers.
Thanks for any help.
Regards
14:30, EEST

December 21, 2011

These are kind of notification events that the events that are sent between them correspond to “currently active” events, so that the client can differentiate between the initial state and new change events after that.
You can basically just check the EventTypeId. I do not think that you need to define a separate listener for these events: they are special events that are sent for every subscription anyway.
In general, if you need to listen to “any events” from the server, you can listen to the Server object. If you want to filter only “normal” events and no Conditions, you would need to use something like “Not IsTypeOf(ConditionType)”
8:20, EEST

December 21, 2011

These events have no fields except for the EventType.
And you do not see these events in the EventListener.
This is the method in EventManager that does it:
Subscription subscription) throws StatusException {
fireConditionRefresh(serviceContext, subscription); // calls EventListener.onConditionRefresh
for (MonitoredItemBase item : subscription.getItems())
if (item instanceof MonitoredEventItem) {
final MonitoredEventItem eventItem = (MonitoredEventItem) item;
refreshStartEvent(eventItem);
try {
refreshItem(eventItem);
} finally {
refreshEndEvent(eventItem);
}
}
return true;
}
14:10, EEST

December 21, 2011

6:38, EEST

January 27, 2012

Well, I will do nothing with it 😉
It was a request by the client developer, because he figured out that these events do not provide data like Stamp or NodeId. However, as I also understand these events as only being “indicators” I will discuss with him why I should try to change these events.
Thank you.
Most Users Ever Online: 1919
Currently Online:
107 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 793
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1538
Posts: 6493
Newest Members:
sophiadavis, Waynegalse, Phillipbus, Oscarsat, WilliamJer, WilliamTunse, mvsjonah79, RaymondSmutt, Merlin AI pap, patlawrence98Moderators: Jouni Aro: 1027, Pyry: 1, Petri: 0, Bjarne Boström: 1037, Jimmy Ni: 26, Matti Siponen: 353, Lusetti: 0
Administrators: admin: 1