Reference Guide
Table Of Contents
- 1 Introduction
- 2 Establishing Your Test and Development Environments
- 3 Developing Applications
- Introduction
- Authentication
- REST API
- Audit Logging
- Alert Logging
- Configuration
- High Availability
- OpenFlow
- Metrics Framework
- GUI
- SKI Framework - Overview
- SKI Framework - Navigation Tree
- SKI Framework - Hash Navigation
- SKI Framework - View Life-Cycle
- SKI Framework - Live Reference Application
- UI Extension
- Introduction
- Controller Teaming
- Distributed Coordination Service
- Persistence
- Backup and Restore
- Device Driver Framework
- 4 Application Security
- 5 Including Debian Packages with Applications
- 6 Sample Application
- Application Description
- Creating Application Development Workspace
- Application Generator (Automatic Workspace Creation)
- Creating Eclipse Projects
- Updating Project Dependencies
- Building the Application
- Installing the Application
- Application Code
- 7 Testing Applications
- 8 Built-In Applications
- Appendix A
- Appendix B
- Bibliography
After disconnecting the devices from the HP VAN SDN Controller (Stopping Mininet [45] in case
of a virtualized network) the device’s active state should be updated to OFF.
Application Manager Events/State
In addition to the OSGI application service events, developers have access to SDN application
events and SDN application state. For example, applications can query their own state during
deactivation to perform pre-uninstall and/or pre-upgrade work.
The following is an example of how to listen to application events:
private ApplicationService as;
private AppEventListener listener = new MyAppEventListener();
private class MyAppEventListener implements AppEventListener {
@Override
public void handleAppEvent(ApplicationEventType e, Application app) {
if (app.id().equals(“my-app-id”)) {
if (e == ApplicationEventType.UNINSTALLING) {
// handle event
} else if (e == ApplicationEventType.UPGRADING) {
// handle event
}
}
}
}
protected void bindAppService(ApplicationService as) {
this.as = as;
as.addApplicationListener(listener);
}
protected void unbindAppService(ApplicationService as) {
this.as = null;
}
@Deactivate
protected void deactivate() {
if (as != null)
as.removeAppEventListener(listener);
}
227