O'Reilly logo

OSGi and Apache Felix 3.0 by Walid Joseph Gédéon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - writing the BookshelfServiceProxy

I've chosen the package com.packtpub.felix.bookshelf.service.tui for the proxy and com.packtpub.felix.bookshelf.service.tui.activator for the bundle activator.

The BookshelfServiceProxy is the main class for the bookshelf command functionality. For easy reference, we will define the SCOPE and FUNCTIONS constants that define the commands scope ("book") and the functions that are to be exposed. Currently, we will expose one function for the add command:

public class BookshelfServiceProxy { public static final String SCOPE = "book"; public static final String[] FUNCTIONS = new String[] { "search" }; private BundleContext context; public BookshelfServiceProxy(BundleContext context) { this.context ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required