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
} else {
device.setActiveState(ActiveState.OFF);
}
update(device);
}
}
void stopHandlingControllerEvents(ControllerService controllerService) {
controllerService.removeDataPathListener(dataPathListener);
}
private class DataPathListenerImpl implements DataPathListener {
@Override
public void queueEvent(QueueEvent event) {
}
@Override
public void event(DataPathEvent event) {
if (event.type() == OpenflowEventType.DATAPATH_CONNECTED ||
event.type() == OpenflowEventType.DATAPATH_DISCONNECTED) {
Switch device = etByMacAddress(event.dpid().getMacAddress());
if (device != null) {
if (event.type()== OpenflowEventType.DATAPATH_CONNECTED){
device.setActiveState(ActiveState.ON);
} else {
device.setActiveState(ActiveState.OFF);
}
update(device);
}
}
}
}
}
SwitchComponent.java Consuming ControllerService:
package com.hp.hm.impl;
import com.hp.of.ctl.ControllerService;
...
@Component
@Service
public class SwitchComponent implements SwitchService {
...
@Reference(policy = ReferencePolicy.DYNAMIC,
cardinality = ReferenceCardinality.MANDATORY_UNARY)
224