SDN Controller Programming Guide

128
@Override
public Switch add(Switch device) {
return delegate.add(device);
}
@Override
public void update(Switch device) {
delegate.update(device);
}
@Override
public Switch get(Id<Switch, Long> id) {
return delegate.get(id);
}
@Override
public List<Switch> find(SwitchFilter filter,
SortSpecification<SwitchSortKey> sortSpecification) {
return delegate.find(filter, sortSpecification);
}
@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
components. It is also annotated with @Service to denote this component should be published so it
is consumed by other components.
As mentioned above, don’t write explicit code to publish or consume services. Thus, SwitchService
is ready to be published when the application is installed into the HP VAN SDN Controller.
Verifying Published Services Using Virgo Admin Console
In order to verify our service is actually published we may use the Virgo Admin Console (This
console may be also used to uninstall applications). First build and install the application as
described in Building Application and Installing Application sections.