OSGi: Service registrieren

Generic1

Top Contributor
Hallo,

wenn ich einen Service registrieren möchte in OSGi, dann geht das ganz einfach mit:

Java:
public void start(...) {
context.registerService(CommnadProvider.class.getName(), this, null);
}

wenn der Service aber nicht this ist sondern in einer eigenen Klasse, kann ich dann schreiben:

Java:
public void start(...) {
context.registerService(CommnadProvider.class.getName(), new MyCommandProvider(), null);
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
S OSGi Declarative Service Cardinality Plattformprogrammierung 6
lumo OSGI Service - ServiceReference Plattformprogrammierung 3
F OSGi und root rechte Plattformprogrammierung 2
Z MySQL-Treiber in RAP-Anwendung für Jetty im OSGI- Equinox- Maven-Dschungel Plattformprogrammierung 0
Shams Antbuild - Problem bei OSGi Anfängertutorial Plattformprogrammierung 0
T OSGi OSGI bundle bauen org.apache.xerces Plattformprogrammierung 3
G OSGi Bundle-ClassPath Plattformprogrammierung 3
P OSGi registerService Plattformprogrammierung 3
H OSGi OSGi + Logback + slf4j - Eclipse Run Configuration Plattformprogrammierung 7
G OSGI bundleChanged Plattformprogrammierung 2
E OSGi Equinox HttpService only supports servlet 2.1 specification. Plattformprogrammierung 2
X Probleme mit dem OSGi-Framework Plattformprogrammierung 3
Kr0e OSGI - Anfängerfragen Plattformprogrammierung 3
K OSGi Verteilte Anwendung? Plattformprogrammierung 9
B OSGi Einsteiger OSGi-Applikation Plattformprogrammierung 9
S (OSGI - EQUINOX) Welche Eclipse IDE? Plattformprogrammierung 3
N OSGi: Ressourcen gezielt aus bestimmten Modulen laden? Plattformprogrammierung 4
borobudur OSGi OSGi Blueprint Integrationstests Plattformprogrammierung 6
S OSGi Filter Syntax Plattformprogrammierung 2
N OSGi Dependency Loading Plattformprogrammierung 2
S OSGi Bibliothek für alle Plattformprogrammierung 5
H OSGI mit Eclipse und Maven Plattformprogrammierung 5
X OSGi Splash ohne product Plattformprogrammierung 2
G [osgi] bundle spezifische properties Plattformprogrammierung 5
DEvent [osgi] Services implementieren Plattformprogrammierung 2
C RCP Applikation starten als OSGi Bundle Plattformprogrammierung 2
B equinox OSGi EclipseStarter.startup NullPointerException Plattformprogrammierung 3
B OSGi, Euqinox, innherhalb vom Bundle Pfad des zugehörigen jar-files ermitteln Plattformprogrammierung 6
B OSGi, Equinox, Exceptions werden "ignoriert" Plattformprogrammierung 21
C OSGi, Hibernate und welche Datenbank? Plattformprogrammierung 4
astralarse Custom OSGi Launcher mit config.ini Plattformprogrammierung 6
C Eclipse - Externe OSGi bundles adden Plattformprogrammierung 7
F OSGi Anwendungsdesign Plattformprogrammierung 3
N OSGI in Netbeans? Plattformprogrammierung 5
X OSGi und RCP Plattformprogrammierung 15
C OSGi shutdown Plattformprogrammierung 4
D Problem mit Synth Painter und OSGi (Equinox) Plattformprogrammierung 8
D OSGi JSR296 (Swing Application Framework) - Konzeptionsfrage Plattformprogrammierung 2
G Osgi Plattformprogrammierung 5
A Plugin konzepte: OSGI oder JPF? Plattformprogrammierung 5
S OSGI Framework Knopflerfish Plattformprogrammierung 11
I Calling Contacts Api Service Account Authentication Plattformprogrammierung 7
A OSGi Plugin als Service exportieren und verwenden Plattformprogrammierung 12
S OSGi Warten bis Service vorhanden? Plattformprogrammierung 2
S Deklarativer Service im RCP Feature ? Plattformprogrammierung 8
G Service nicht abbrechen Plattformprogrammierung 6
G Service darstellen Plattformprogrammierung 18
O Neues Tastenkürzel für Eclipse Editorfenster registrieren Plattformprogrammierung 2
foobar IWorkbenchWindowActionDelegate programatisch registrieren Plattformprogrammierung 2

Ähnliche Java Themen

Neue Themen


Oben