1 /* DomainEvents.java */
6 * @author Lukas Pokorny (lukas_pokorny@centrum.cz)
7 * @author CTU FEE Prague - Department of Control Engineering (dce.felk.cvut.cz)
8 * @author Project ORTE - OCERA Real Time Ethernet (www.ocera.org)
9 * @author dedication to Kj
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
24 package org.ocera.orte.types;
27 public abstract class DomainEvents {
28 /* handler to C struct with default domain properties */
29 private long handle = 0;
32 /* load native library 'libjorte.so' */
34 System.loadLibrary("jorte");
39 this.handle = jORTEDomainInitEvents();
40 System.out.println(":j: events created & initialized..");
43 public long getHandle()
48 public boolean destroy()
50 System.out.println(":j: DomainEvents destroy called..");
52 if(!jORTEDomainEventsDestroy(this.handle)) {
53 System.out.println(":j: DomainEvents destroy fault!");
57 System.out.println(":j: DomainEvents destroy successful..");
62 public abstract void onRegFail();
63 public abstract void onMgrNew(AppInfo appInfo);
64 public abstract void onMgrDelete(AppInfo appInfo);
65 public abstract void onAppRemoteNew(AppInfo appInfo);
66 public abstract void onAppDelete(AppInfo appInfo);
67 public abstract void onPubRemoteNew(AppInfo appInfo, PubInfo pubInfo);
68 public abstract void onPubRemoteChanged(AppInfo appInfo, PubInfo pubInfo);
69 public abstract void onPubDelete(AppInfo appInfo, PubInfo pubInfo);
70 public abstract void onSubRemoteNew(AppInfo appInfo, SubInfo subInfo);
71 public abstract void onSubRemoteChanged(AppInfo appInfo, SubInfo subInfo);
72 public abstract void onSubDelete(AppInfo appInfo, SubInfo subInfo);
74 /* ****************************************************************** *
78 * ****************************************************************** */
82 * jPropDefaultGet - returns handler to default properties of a domain,
83 * if occures some error return NULL.
85 * @return handler to default properties of a domain, NULL if error
88 long jORTEDomainInitEvents();
91 boolean jORTEDomainEventsDestroy(long handle);