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
NOTE
The usage of
SwitchComponent
may be omitted and directly annotate
SwitchManager
if preferred. The
generated example application does not provide a SwitchComponent.java file.
SwitchComponent.java (Sample Application OSGi Service Component):
package com.hp.hm.impl;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Service;
...
@Component
@Service
public class SwitchComponent implements SwitchService {
private SwitchService delegate;
public SwitchComponent() {
delegate = new SwitchManager();
}
@Override
public Switch create(String name) {
return delegate.add(name);
}
@Override
public Collection<Switch> getAll() {
delegate.getAll();
}
@Override
public Switch get(Id<Switch, UUID> id) {
return delegate.get(id);
}
@Override
public void delete(Id<Switch, Long> id) {
delegate.delete(id);
}
}
SwitchComponent is annotated with @Component to make it part of the OSGi component
management framework (lifecycle management) and thus it is allowed to consume other
160