SlideShare une entreprise Scribd logo
1  sur  78
© 2008 by ProSyst Software GmbH; made available under the EPL v1.0 | 17 March 2008
The OSGi Complete
Dr. Pavlin Dobrev
Research and Development Manager, ProSyst Labs EOOD
Eclipse Equinox Committer
p.dobrev@prosyst.com
Stoyan Boshev
Department Manager Development Tools, ProSyst Labs EOOD
Eclipse Equinox Committer
s.boshev@prosyst.com
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Contents
• Introduction and Services Overview
• OSGi Wire Admin Service Specification
• OSGi Declarative Services Specification
• OSGi IO Connector Service Specification
• OSGi Initial Provisioning
• Conclusions and Future Work
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Introduction
• The aim of the tutorial is to present several not well
known OSGi services and to promote them to the
Eclipse community.
• Special attention will be given to the code snippets and
programming examples.
• The applications presented here are based on
Equinox.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Donated Services from ProSyst
• Implementations of:
 OSGi Wire Admin Service Specification
 OSGi Declarative Services Specification
 OSGi IO Connector Service Specification
 OSGi Initial Provisioning
• Quality of the implementations:
 Production ready code used in many projects
 All services successfully pass the corresponding OSGi test
cases.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Donation History
• EclipseCon 2007 – ProSyst declares the intention for
donation of missing OSGi Services implementations.
• July 2007 – Service code is contributed to Equinox
Incubator.
• September 2007 – All IP logs are resolved.
• February 2008 – after successfully passed
Graduation Review all components will be included in
the Ganymede Simultaneous Release started from
Milestone 6. The components can be downloaded
from Eclipse Equinox web site.
• Pavlin Dobrev and Stoyan Boshev will support them as
committers.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Service Implementations Overview 1/2
• OSGi Wire Admin Service Specification
 An administrative service that is used to control a wiring topology
 Used to wire components that produce data to components which
consume data.
• OSGi IO Connector Service Specification
 Adopts the javax.microedition.io package as a basic communication
infrastructure.
 In J2ME, the Connector framework can be extended by the vendor
of the Virtual Machine, but cannot be extended at run-time by bundle
code.
 This specification defines a service that adopts the flexible model of
the Connector framework, but allows bundles to extend it.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Service Implementations Overview 2/2
• OSGi Declarative Services Specification
 Uses a declarative model for publishing, finding and binding to OSGi
services.
 Simplifies the task of authoring OSGi services by performing the
work of registering the service and handling service dependencies.
• OSGi Initial Provisioning Specification
 Defines how the Management Agent can make its way to the Service
Platform, and gives a structured view of the problems and their
corresponding resolution methods.
 Enables the management of a Service Platform by an Operator, and
(optionally) to hand over the management of the Service Platform
later to another Operator.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Wire Admin Service Specification - Theory
• The Wire Admin service is an administrative service that
is used to control a wiring topology in the OSGi Service
Platform
• Bundles participate in this wiring process by registering
services that produce or consume data. The Wire Admin
service wires the services that produce data to services
which consume data
• The Wire Admin service is designed to cooperate
closely with the Configuration Admin service.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Wire Admin – Problems to be Solved
• When a bundle wants to use a service and there are
several implementations available, the bundle will
receive one at random.
• After a bundle has started using a service, the
framework is no longer in control of the volume or type
of data that is transferred.
• If an administrator wants to make a bundle stop using
a service, the only way is either to stop the producer or
the consumer of the service.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Wire Admin Service Specification - Solution
• Wire Admin Service is between the producer and the
consumer of the service
• The Wire Admin Service controls the connection and
the data
• Typical data-producing service can be, for example,
one that represents some physical device.
It produces information about
its current status.
• Typical data-consumers
can be detectors, gauges,
user interfaces, etc.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Wire Admin Service – Objects 1/4
• Producer - A service object that generates information
to be used by a Consumer service
• Consumer - A service object that receives information
generated by a Producer service
• Wire - An object created by the Wire Admin service
that defines an association between a Producer
service and a Consumer service. Multiple Wire objects
can exist between the same Producer and Consumer
pair
• WireAdmin - The service that provides methods to
create, update, remove, and list Wire objects.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Wire Admin Service – Objects 2/4
• WireAdminListener -A service that receives events
from the Wire Admin service when the Wire object is
manipulated or used.
• WireAdminEvent - The event that is sent to a
WireAdminListener object, describing the details of
what happened.
• Configuration Properties - Properties that are
associated with a Wire object and that contain identity
and configuration information set by the administrator
of the Wire Admin service.
• PID - The Persistent Identity as defined in the
Configuration Admin specification.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Wire Admin Service – Objects 3/4
• Flavors - The different data types that can be used to
exchange information between Producer and
Consumer services.
• Composite Producer/Consumer - A Producer/
Consumer service that can generate/accept different
kinds of values.
• Envelope - An interface for objects that can identify a
value that is transferred over the wire. Envelope
objects contain also a scope name that is used to
verify access permissions.
• Scope - A set of names that categorizes the kind of
values contained in Envelope objects for security and
selection purposes.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Wire Admin Service – Objects 4/4
• Basic Envelope - A concrete implementation of the
Envelope interface.
• WirePermission - A Permission sub-class that is used
to verify if a Consumer service or Producer service has
permission for specific scope names.
• Composite Identity - A name that is agreed between
a composite Consumer and Producer service to
identify the kind of objects that they can exchange.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
org.osgi.service.wiring package:
Source: OSGi Specification
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Creating a Producer Service 1/2
• A producer service must implement and register the
org.osgi.service.wireadmin.Producer interface. Its
polled(Wire) method should return the data output
sent across the wires.
• The consumersConnected(Wire[]) method actualizes
the list of connected wires.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Creating a Producer Service 2/2
• Each producer may be registered with the following properties:
 org.osgi.framework.Constants.SERVICE_PID - the service PID of
the producer (mandatory)
 WireConstants.WIREADMIN_PRODUCER_FLAVORS - the object
classes created by the producer. It takes Class[] values.
 WireConstants.WIREADMIN_PRODUCER_FILTERS - (if the
producer will handle the filtering) the data filters.
 WireConstants.WIREADMIN_PRODUCER_COMPOSITE - (for
composite producers only) the service PIDs of the composite
consumers it will communicate with.
 WireConstants.WIREADMIN_PRODUCER_SCOPE - (for
composite producers only) the data types the producer will create.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Example Producer 1/2
• The following example creates a producer for String output. This
is indicated by the value of the
org.osgi.service.wireadmin.WireConstants.WIREADMIN_PRODU
CER_FLAVORS registration property. The service is also
registered with the producer.all PID. The only output it sends is a
single String. It will be received by consumers connected with
wires to this producer.
...
public void start (BundleContext bc) throws BundleException {
Hashtable props = new Hashtable();
//the producer will be sending String data (flavors)
Class[] flavors = new Class[] {String.class};
props.put(WireConstants.WIREADMIN_PRODUCER_FLAVORS, flavors);
//the producer PID property
props.put("service.pid", "producer.all");
reg = bc.registerService(Producer.class.getName(), this, props);
}
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Example Producer 2/2
/** If there are connected wires, updates them with the produced
values */
public void consumersConnected(Wire[] wires) {
if (wires != null) {
for (int i = 0; i < wires.length; i++) {
wires[i].update(polled(wires[i]));
}
}
}
/** This method is responsible for creating the output */
public Object polled(Wire wire) {
String output = "Hello there! This is the producer speaking!";
return output;
}
}
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Filtering the Data Output
• By the producer - The producer can be implemented so as to
filter the data for sending (its polled method should be
implemented so as to produce only values corresponding to the
necessary filter). In this case, it must be registered with the
WireConstants.WIREADMIN_PRODUCER_FILTERS property.
• By the connecting wire - In this case, the Wire Admin will create
the Wire with the WireConstants.WIREADMIN_FILTER property;
the producer must NOT have the
WireConstants.WIREADMIN_PRODUCER_FILTERS property
simultaneously!
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Filtering the Data Output by the Producer
...
Hashtable props = new Hashtable(3);
Class[] flavors = new Class[] {Double.class};
//the producer registers for Double data output
props.put(WireConstants.WIREADMIN_PRODUCER_FLAVORS, flavors);
props.put(WireConstants.SERVICE_PID, "producer.that.filters");
// set this registration property with some value
//to indicate that filtering is performed by the producer
props.put(WireConstants.WIREADMIN_PRODUCER_FILTERS, "some.value");
bc.registerService(Producer.class.getName(), this, props);
...
//the data is sent only if it is no smaller than 25
public Object polled(Wire wire) {
return (currentTemperature >= 25.d) ? new Double(currentTemperature) : null;
}
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Value Based Filters
• WireConstants.WIREVALUE_CURRENT ("wirevalue.current") -
Indicates the current value available on the wire
• WireConstants.WIREVALUE_PREVIOUS ("wirevalue.previous")
- Indicates the previous value passed across the wire
• WireConstants.WIREVALUE_DELTA_ABSOLUTE
("wirevalue.delta.absolute") - The absolute (always positive)
difference between the last update and the current value
• WireConstants.WIREVALUE_DELTA_RELATIVE
("wirevalue.delta.relative") - The relative difference is
(current_value - previous_value ) / current.
• WireConstants.WIREVALUE_ELAPSED ("wirevalue.elapsed") -
for constructing time-based filters. It represents the elapsed time
in milliseconds between the current value and the previous value
sent by the producer.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Creating a Consumer Service
• A consumer service must implement and register the
org.osgi.service.wireadmin.Consumer interface. It may have the
following list of registration properties:
 org.osgi.framework.Constants.SERVICE_PID - the service PID of
the consumer (mandatory)
 WireConstants.WIREADMIN_CONSUMER_FLAVORS - the
consumed data object classes (flavors).
 WireConstants.WIREADMIN_CONSUMER_COMPOSITE - (only
for composite consumers) the service PIDs of the producers this
service will communicate with
 WireConstants.WIREADMIN_CONSUMER_SCOPE - (only for
composite consumers) the list of descriptive data types consumed by
the service.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Example Consumer
...
public void start(BundleContext bc) throws
BundleException {
Hashtable prop = new Hashtable();
//this property shows that the consumer will accept
any data types
prop.put(WireConstants.WIREADMIN_CONSUMER_FLAVORS,
new Class[] {Object.class});
//the identifier property of the consumer
prop.put("service.pid", "consumer.all");
//registering the service on the framework
reg = bc.registerService(Consumer.class.getName(),
this, prop);
}
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Example Consumer
/** Watches the list of wires*/
public void producersConnected(Wire[] wires) {
if (wires == null) {
System.out.println("Not connected to any wires");
} else {
System.out.println("Connected to " + wires.length
+ " wires");
}
}
/** Receives the new data whenever such are available
*/
public void updated(Wire wire, Object value) {
System.out.println("Updated " + wire + " with value
" + value);
}
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Creating Wire using Wireadmin
// getting a WireAdmin service reference
waRef =
bc.getServiceReference(WireAdmin.class.getName());
// getting the WireAdmin Service Implementation
wa = (WireAdmin) bc.getService(waRef);
// create wire
wire = wa.createWire("producer.all", "consumer.all", new
Hashtable());
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Creating Wire
// getting a Configuration Admin service reference
saRef = bc.getServiceReference(ConfigurationAdmin.class.getName());
ca = (ConfigurationAdmin) bc.getService(saRef);
try {
// Create Factory Configuration
c=ca.createFactoryConfiguration("equinox.wireadmin.fpid",
"initial@reference:file:plugins/org.eclipse.equinox.wireadmin_0.1.0.jar/")
;
Hashtable props = new Hashtable();
props.put("wireadmin.consumer.pid", "consumer.all");
props.put("wireadmin.producer.pid", "producer.all");
c.update(props);
} catch (IOException e) {
throw new BundleException("Configuration Admin Exception!"
+ e.getMessage());
}
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Creating Composite Producers/Consumers 1/2
• Composite consumers and producers have additional
registration properties besides those for ordinary
producers and consumers. See the corresponding
descriptions for details.
• Such composite services exchange data in the form of
org.osgi.service.wireadmin.Envelope objects (flavors).
An Envelope wraps a number of data types, for
example: "front left door status", "rear left door status"
and "airbag status".
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Creating Composite Producers/Consumers 2/2
• The org.osgi.service.wireadmin package provides the
following class implementing the Envelope interface:
 BasicEnvelope - this class can be used as a basic
implementation of the Envelope interface.
Source: OSGi Specification
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Example – Implementing Composite Producer
. . .
private String[] scope = new String[] {"current.date","hello","bye"};
private Class[] flavors = new Class[] {Envelope.class};
. . .
/** Registering the service with the necessary props */
java.util.Hashtable props = new java.util.Hashtable();
//the data types transmitted by this producer
props.put(WireConstants.WIREADMIN_PRODUCER_SCOPE,scope);
props.put(org.osgi.framework.Constants.SERVICE_PID,"test.producer");
//this property indicates the PIDs of the consumers that the producer will
communicate with
props.put(WireConstants.WIREADMIN_PRODUCER_COMPOSITE, new String[]
{"test.consumer"});
//for composite services, the value of this property must be Envelope
props.put(WireConstants.WIREADMIN_PRODUCER_FLAVORS, flavors);
bc.registerService(Producer.class.getName(),this,props);
. . .
public Object polled(Wire wire) {
String date = new java.util.Date().toString();
BasicEnvelope envelope = new
BasicEnvelope(date,"test.producer","current.date");
System.out.println("Message from the producer: My current date is
"+envelope.getValue());
return envelope;
}
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Creating a WireAdmin Listener
• The WireAdminListener interface allows you to receive
WireAdminEvent-s notifying of changes in the state of the wire.
The WireAdminEvent class provides the following types of events
and their correspondent class fields:
 creating a new Wire object - WIRE_CREATED
 connecting an existing Wire object - WIRE_CONNECTED
 updating an existing Wire object with new properties -
WIRE_UPDATED
 transferring a new value over the Wire object - WIRE_TRACE
 disconnecting an existing Wire object - WIRE_DISCONNECTED
 deleting an existing wire - WIRE_DELETED
 a Producer service method has thrown an exception -
PRODUCER_EXCEPTION
 a Consumer service method has thrown an exception -
CONSUMER_EXCEPTION
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Creating a WireAdmin Listener - Code Example
public void start(BundleContext bc) {
//bitwise OR of the event types
Integer bitmask = new Integer(WireAdminEvent.PRODUCER_EXCEPTION |
WireAdminEvent.CONSUMER_EXCEPTION);
Hashtable props = new Hashtable();
props.put(WireConstants.WIREADMIN_EVENTS, bitmask);
reg = bc.registerService(WireAdminListener.class.getName(), this,
props);
}
// WireAdminListener implementation
public void wireAdminEvent(WireAdminEvent e) {
switch (e.getType()) {
case WireAdminEvent.PRODUCER_EXCEPTION:
// do some work
break;
case WireAdminEvent.CONSUMER_EXCEPTION:
// do some work
break;
}
}
}
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi WireAdmin Summary
• Used to wire components that produce data to
components which consume data
• Data can be:
 Simple
 Composite
• Data can be filtered:
 By the producer
 By the Wire itself
• Additionally you can listen for WireAdmin Events
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Declarative Services Specification
• What are Declarative Services?
 Service component model
 Represent components and their dependencies to services
 A component may provide a service and/or may consume a service
 Declarative representation in XMLs
 Service component runtime (SCR)
 Processes the components of the activated bundles
 Manages the lifecycle of the components based on changes in:
dependent services
configurations (Configuration Admin Service Specification)
bundles state
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Service Component Runtime relations
Source: OSGi Specification
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Component Life Cycle 1/2
• Enabled state
 It is bound to its bundle life cycle
 Can be initially controlled by the component description
(attribute “enabled”)
 Can be controlled programatically by using the
ComponentContext methods enableComponent(String) and
disableComponent(String)
• Satisfied state
 A component is satisfied when:
 It is enabled
 All of its references are satisfied
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Component Life Cycle 2/2
• Activation
 Activating a component consists of the following steps performed by
SCR:
 Load the component implementation class
 Create the component instance and component context
 Bind the target services
 Call the activate method, if present
• Deactivation
 Deactivating a component consists of the following steps performed
by SCR:
 Call the deactivate method, if present
 Unbind any bound services
 Release all references to the component instance and component
context
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
First steps using Declarative services
• Steps required to create a component that provides a
service:
 Create the service interface
 Create the implementation of the interface
 Write the component description XML
 Add the component description to the “Service-Component”
manifest header
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Declarative Services – Step By Step 1,2/4
1. Write the service interface:
package simple.service;
public interface HelloService {
public void hello();
}
2. Write the service implementation:
package simple.service.impl;
import simple.service.HelloService;
public class HelloServiceImpl implements
HelloService {
public void hello() {
System.out.println("Hello components!");
}
}
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Provide an XML with the component description 3/4
<?xml version="1.0" encoding="UTF-8"?>
<scr:component name="HelloServiceComponent"
xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
<!-- The component's implementation class-->
<implementation class="simple.service.impl.HelloServiceImpl"/>
<service>
<!--The interface of the service provided by the component-->
<provide interface="simple.service.HelloService"/>
</service>
</scr:component>
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Header in Bundle Manifest 4/4
• Use Service-Component header in the manifest
to declare the XML description:
Service-Component: <path to the XML document's location>
• For example
Service-Component: OSGI-INF/Hello.xml
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
References to services 1/4
• Accessing services
 Lookup strategy
 Component implementations must have
activate(ComponentContext) and deactivate(ComponentContext)
methods
 use ComponentContext to locate services
 Event strategy (binder methods)
 The component defines bind and unbind methods for each
reference
 These methods can have as parameter ServiceReference or the
type specified by the reference’s interface attribute
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
References to services 2/4
• Reference cardinality
 “cardinality” is an optional attribute of the “reference” element
 It defines the reference’s multiplicity and optionality
 Possible cardinality values:
0..1 – Optional and unary
1..1 – Mandatory and unary (Default)
0..n – Optional and multiple
1..n – Mandatory and multiple
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
References to services 3/4
• Reference policy
 Static
 The default policy of a reference
 Components are reactivated on each change of its reference
 Simple but expensive
 Not suitable for references with cardinality 0..n or 1..n
 Dynamic
 More complex to handle
 SCR updates the bound service of a component without
reactivating it
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
References to services 4/4
• Selecting target services
 Use the “target” attribute to define a filter to constrain the
services that match the reference
 The “target” is an LDAP filter
Example:
<reference name=“AppFactory"
interface="org.osgi.service.component.ComponentFactory"
target="(component.factory=my.application)"
/>
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Lookup Strategy for Getting Services 1/3
1. Write a reference element in the component's
description XML to declare the referenced service(s)
2. Get the component's ComponentContext object
passed as an argument to the component's
activate() method
3. Call the locateService or locateServices method
of the ComponentContext
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Lookup Strategy for Getting Services 2/3
<?xml version="1.0" encoding="UTF-8"?>
<scr:component name="HelloServiceLookup"
xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
<implementation
class="simple.service.reference.HelloServiceLookup
"/>
<reference name="helloService"
interface="simple.service.HelloService"
/>
</scr:component>
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Lookup Strategy for Getting Services 3/3
public class HelloServiceLookup {
ComponentContext cc;
protected void activate(ComponentContext ctxt){
this.cc = ctxt;
}
public void useService() {
HelloService helloService =
(HelloService) cc.locateService("helloService");
helloService.hello();
}
protected void deactivate(ComponentContext ctxt){
this.cc = null;
}
}
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Event Strategy for Getting Services 1/3
1. Write binding and unbinding methods
2. Declare them in the reference element of the
component description
3. SCR passes the referenced service as an argument
of the bind and unbind methods
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Event Strategy for Getting Services 2/3
...
public class HelloServiceBind {
HelloService helloService;
public void setHelloService(HelloService helloService){
this.helloService = helloService;
}
public void unsetHelloService(HelloService helloService){
this.helloService = null;
}
protected void activate(ComponentContext ctxt){
//note that lookupService() is not called
helloService.hello();
}
...
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Event Strategy for Getting Services 3/3
<?xml version="1.0" encoding="UTF-8"?>
<scr:component name="HelloServiceBind"
xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
<implementation
class="simple.service.reference.HelloServiceBind"/>
<reference name="helloService"
interface="simple.service.HelloService"
bind="setHelloService"
unbind="unsetHelloService"
/>
</scr:component>
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Delayed / Immediate Components
•Delayed components are lazily instantiated
•A component is delayed in case:
It provides a service
It does not have the attribute immediate=“true” in
its XML description
•Immediate components are instantiated as
soon as they become satisfied
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Factory Components
• Factory component creates component configurations on
demand
• Factory component is specified by using the “factory”
attribute in the component’s element
• org.osgi.service.component.ComponentFactory service is
registered for each factory component
• ComponentFactory.newInstance(Dictionary) can be used
for creating new component instances
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Component Properties
• Component properties are put as service properties when
SCR registers a component service
• They can be used in the “target” attribute of a reference
for constraining the set of services that match
• SCR always adds the property “component.name”
• Properties can be set/overriden by:
 The argument of ComponentFactory.newInstance(Dictionary)
 Configuration object (retrieved by Configuration Admin)
 The component description
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Component Factory Example
<?xml version="1.0" encoding="UTF-8"?>
<scr:component name="HelloServiceComponentFactory"
factory="hello.component.factory"
xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
<!-- The component's implementation class-->
<implementation
class="simple.service.impl.HelloServiceImpl"/>
<service>
<!--The interface of the service provided by the
component-->
<provide interface="simple.service.HelloService"/>
</service>
<property name="SomeProperty" value="initial value"/>
<property name="instanceID" type="Integer" value="0"/>
</scr:component>
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Advantages of Declarative Services
• Solves crucial problems of large systems like
 Startup time
 Memory footprint
• Deals with the complexity of handling the dynamism of
services
 Code simplification
 Error preventive
• Can support components which are not OSGi aware
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Available tools for DS
• There are no available tools for DS at this moment
• DS support will become part of PDE (not in Eclipse 3.4)
• ProSyst will provide DS Editor plugin for Eclipse 3.4
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi IO Connector Service Specification
• OSGi IO Connector Service specification adopts the Java 2
Micro Edition (J2ME) javax.microedition.io packages as a basic
communications infrastructure. In J2ME, this API is also called
the Connector framework.
• ConnectorService – The service that performs the same
function - creating connections from different providers - as the
static methods in the Connector framework of
javax.microediton.io.
• ConnectionFactory – A service that extends the Connector
service with more schemes.
• Scheme – A protocol or device that is supported in the Connector
framework.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Source: OSGi Specification
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi IO Connector Service Specification - URI
• Examples:
 sms://+46705950899;expiry=24h;reply=yes;type=9
 datagram://:53
 socket: //www.acme.com:5302
 comm://COM1;baudrate=9600;databits=9
 file:c:/autoexec.bat
• The same interfaces can be used for communication
via TCP/IP, UDP, SMS, USB/COMM, Bluetooth
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
How IO Connector Works
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
How the IO Connector Service Creates Connections
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Connection Types (javax.microedition.io package)
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi IO Connector Service – Example
• Server
server = (StreamConnectionNotifier)connService.open(
"socket://:3333", ConnectorService.READ);
connection = server.acceptAndOpen();
DataInputStream inputStream = connection.openDataInputStream();
• Client
connection = (StreamConnection)connService.open(
"socket://localhost:3333");
DataOutputStream outputStream =
connection.openDataOutputStream();
//the simple String data sent to the server
outputStream.writeUTF("Hello there from the client!");
• Socket Factory Implementation
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi IO Connector Service – Summary
• In J2ME, the Connector framework can be extended
by the vendor of the Virtual Machine, but cannot be
extended at run-time by bundle code. The defined IO
Connector service goes behind this restriction and
allows bundles to add new connection factories
dynamically.
• The same interfaces can be used for communication
via TCP/IP, UDP, SMS, USB/COMM, Bluetooth
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Initial Provisioning - terminology
• Management Agent – A set of one or more bundles
that run on the OSGi framework and communicate
with the Remote Management System to provide
management of the Service Platform
• Initial Provisioning - The process in which an OSGi
Framework is provisioned with a Management Agent
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Initial Provisioning - entities
• Provisioning Service - A service registered with the
OSGi Framework that supports supplying of the initial
configuration needed to trigger the initial provisioning
process and provides information about the initial
provisioning to the Management Agent
• Provisioning Dictionary - A Dictionary object holding
the initial provisioning configuration. This dictionary is
filled through the Provisioning Service methods and
with information from a ZIP files that are loaded during
initial setup
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
org.osgi.service.provisioning package:
Source: OSGi Specification
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Initial Provisioning Sequence (ProSyst mPRM)
mPRM OSGi Device
Initial
Provisioning
Service
Initial
Provisioning
Server
OSGi DM Adapter
Set Provisioning URL
Get Provisioning Data by URL
Install mPRM MA Loader
Platform info about device
Initiate Management Session
Install Optional Agent bundles
Read
Config
Optional Management Agents
Install
MA Loader
Bundle
InstallList of bundles &
config. settings
Core Management
Agent
Core Management
Agent
Install
Set config
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Initial Provisioning Procedure 1/2
1. The Initial Provisioning Service is supplied with an
initial request URL
2. The Initial Provisioning Service sends request to the
Management System using the initial request URL
3. Management System returns a ZIP file containing
entries that are placed in the Provisioning Dictionary
object and stored persistently.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Initial Provisioning Procedure 2/2
4. The Provisioning Service installs (but does not start)
all entries in the ZIP file that are typed as a bundle or
bundle-url.
5. If the ZIP file contains
PROVISIONING_START_BUNDLE entry the
Provisioning Service starts the previously installed
bundle under the location which is the value of that
entry.
6. If the ZIP file contains
PROVISIONING_REFERENCE entry then the entire
procedure is repeated using the value of this entry
as a new initial request URL.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
What is covered by the OSGi Specification
• The Initial Provisioning Assignment algorithm
• The format of the ZIP file and the allowed types of the entries -
String, byte[], bundle and bundle-url
• A set of predefined entry names with special meaning -
PROVISIONING_REFERENCE, PROVISIONING_SPID,
PROVISIONING_START_BUNDLE,
PROVISIONING_ROOTX509
• The API of the Provisioning Service for reading and modifying the
properties of the Provisioning Dictionary by the Management
Agent.
• Optional protocol mappings over HTTP, HTTPS and RSH
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
What is not standardized by the OSGi
• The way for providing the Provisioning Service with the initial
request URL. Possible variants are: staged by the manufacturer,
input by the user or obtained from a SIM-card.
• The protocol used in the Provisioning Assignment. The protocol is
specified by the schema of the initial URL and can be any public
or proprietary protocol as far as it is supported by the Framework.
Examples - http(s)://, file://, smart-card://
• The number and names of properties which could be assigned to
the Provisioning Dictionary. Thus different Management Agents
may be configured with a different set of properties.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
OSGi Initial Provisioning - avdantages
• Policy Free - The Initial Provisioning Service provides
business model agnostic solution for Remote
Management. None of the affected parties (Operators,
SPS Manufacturers, etc.) is forced into any particular
business model.
• Interoperability - The Initial Provisioning permit
arbitrary interoperability between management
systems and OSGi enabled devices.
• Flexible - The initial provisioning model is open as
possible, while still achieving interoperability.
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Conclusion, Resources and Future Work
• Eclipse Equinox Web Site
http://www.eclise.org/equinox
• ProSyst Developer’s Zone
http://dz.prosyst.com
• Pavlin Dobrev and Stoyan Boshev will support the
donated services as committers
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Contacts
Thank you! For further information please contact us!
ProSyst Software GmbH
Dürener Straße 405
D-50858 Cologne, Germany
Tel. +49 221 6604-0
Fax +49 221 6604-660
info@prosyst.com
www.prosyst.com
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Thank you!
The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0
Legal Notices
• mPRM is trademark or registered trademark of
ProSyst Software GmbH in Germany and other
countries
• Java and all Java-based trademarks are trademarks of
Sun Microsystems, Inc. in the United States, other
countries, or both
• Other company, product, or service names may be
trademarks or service marks of others

Contenu connexe

Tendances

Transport SDN & NFV - What does it mean for Optical Networking?
Transport SDN & NFV - What does it mean for Optical Networking?Transport SDN & NFV - What does it mean for Optical Networking?
Transport SDN & NFV - What does it mean for Optical Networking?Deborah Porchivina
 
OFC2016 SDN Framework and APIs
OFC2016 SDN Framework and APIsOFC2016 SDN Framework and APIs
OFC2016 SDN Framework and APIsDeborah Porchivina
 
Adaptive Network Middleware CSC (Communication Service Concierge) - R Kawamura
Adaptive Network Middleware CSC (Communication Service Concierge)  - R KawamuraAdaptive Network Middleware CSC (Communication Service Concierge)  - R Kawamura
Adaptive Network Middleware CSC (Communication Service Concierge) - R Kawamuramfrancis
 
2018 OIF SDN T-API Readout 6.2018
2018 OIF SDN T-API Readout 6.20182018 OIF SDN T-API Readout 6.2018
2018 OIF SDN T-API Readout 6.2018Leah Wilkinson
 
OSGi Community Event 2010 - Experiences with OSGi in Industrial Applications
OSGi Community Event 2010 - Experiences with OSGi in Industrial ApplicationsOSGi Community Event 2010 - Experiences with OSGi in Industrial Applications
OSGi Community Event 2010 - Experiences with OSGi in Industrial Applicationsmfrancis
 
Considerations for Deploying Virtual Network Functions and Services
Considerations for Deploying Virtual Network Functions and ServicesConsiderations for Deploying Virtual Network Functions and Services
Considerations for Deploying Virtual Network Functions and ServicesOpen Networking Summit
 
Update OSGi Residential Expert Group
Update OSGi Residential Expert Group Update OSGi Residential Expert Group
Update OSGi Residential Expert Group OSGiUsers
 
System Testing and Integration: Test Strategy for Brahmaputra
System Testing and Integration: Test Strategy for BrahmaputraSystem Testing and Integration: Test Strategy for Brahmaputra
System Testing and Integration: Test Strategy for BrahmaputraOPNFV
 
Co-Packaged Optics: The OIF’s Work to Standardize Higher Integration Levels f...
Co-Packaged Optics: The OIF’s Work to Standardize Higher Integration Levels f...Co-Packaged Optics: The OIF’s Work to Standardize Higher Integration Levels f...
Co-Packaged Optics: The OIF’s Work to Standardize Higher Integration Levels f...Leah Wilkinson
 
Enabling Active Networks Services on A Gigabit Routing Switch
Enabling Active Networks Services on A Gigabit Routing SwitchEnabling Active Networks Services on A Gigabit Routing Switch
Enabling Active Networks Services on A Gigabit Routing SwitchTal Lavian Ph.D.
 
OPNFV EMC - Benefiting from IT & Net Ops Convergence
OPNFV EMC - Benefiting from IT & Net Ops ConvergenceOPNFV EMC - Benefiting from IT & Net Ops Convergence
OPNFV EMC - Benefiting from IT & Net Ops ConvergencePaul To
 
Singapore oif transport-sdn-junjie li
Singapore oif transport-sdn-junjie liSingapore oif transport-sdn-junjie li
Singapore oif transport-sdn-junjie liDeborah Porchivina
 
NFV Ecosystem Enabler - a well-enabled VNF package catalyst
NFV Ecosystem Enabler - a well-enabled VNF package catalystNFV Ecosystem Enabler - a well-enabled VNF package catalyst
NFV Ecosystem Enabler - a well-enabled VNF package catalystJenny Huang
 
Unmeshing the service mesh
Unmeshing the service meshUnmeshing the service mesh
Unmeshing the service meshCodeValue
 
Federated CDNs: What every service provider should know
Federated CDNs: What every service provider should knowFederated CDNs: What every service provider should know
Federated CDNs: What every service provider should knowPatrick Hurley
 
Managing Egress with Istio
Managing Egress with IstioManaging Egress with Istio
Managing Egress with IstioSolo.io
 
Updates on NFV and SDN Activities from the Broadband Forum
Updates on NFV and SDN Activities from the Broadband ForumUpdates on NFV and SDN Activities from the Broadband Forum
Updates on NFV and SDN Activities from the Broadband ForumOpen Networking Summit
 
Software defined optical communication
Software defined optical communicationSoftware defined optical communication
Software defined optical communicationRonak Vyas
 

Tendances (20)

Transport SDN & NFV - What does it mean for Optical Networking?
Transport SDN & NFV - What does it mean for Optical Networking?Transport SDN & NFV - What does it mean for Optical Networking?
Transport SDN & NFV - What does it mean for Optical Networking?
 
iptv over ngn
iptv over ngniptv over ngn
iptv over ngn
 
OFC2016 SDN Framework and APIs
OFC2016 SDN Framework and APIsOFC2016 SDN Framework and APIs
OFC2016 SDN Framework and APIs
 
Adaptive Network Middleware CSC (Communication Service Concierge) - R Kawamura
Adaptive Network Middleware CSC (Communication Service Concierge)  - R KawamuraAdaptive Network Middleware CSC (Communication Service Concierge)  - R Kawamura
Adaptive Network Middleware CSC (Communication Service Concierge) - R Kawamura
 
2018 OIF SDN T-API Readout 6.2018
2018 OIF SDN T-API Readout 6.20182018 OIF SDN T-API Readout 6.2018
2018 OIF SDN T-API Readout 6.2018
 
OSGi Community Event 2010 - Experiences with OSGi in Industrial Applications
OSGi Community Event 2010 - Experiences with OSGi in Industrial ApplicationsOSGi Community Event 2010 - Experiences with OSGi in Industrial Applications
OSGi Community Event 2010 - Experiences with OSGi in Industrial Applications
 
Considerations for Deploying Virtual Network Functions and Services
Considerations for Deploying Virtual Network Functions and ServicesConsiderations for Deploying Virtual Network Functions and Services
Considerations for Deploying Virtual Network Functions and Services
 
Update OSGi Residential Expert Group
Update OSGi Residential Expert Group Update OSGi Residential Expert Group
Update OSGi Residential Expert Group
 
System Testing and Integration: Test Strategy for Brahmaputra
System Testing and Integration: Test Strategy for BrahmaputraSystem Testing and Integration: Test Strategy for Brahmaputra
System Testing and Integration: Test Strategy for Brahmaputra
 
Co-Packaged Optics: The OIF’s Work to Standardize Higher Integration Levels f...
Co-Packaged Optics: The OIF’s Work to Standardize Higher Integration Levels f...Co-Packaged Optics: The OIF’s Work to Standardize Higher Integration Levels f...
Co-Packaged Optics: The OIF’s Work to Standardize Higher Integration Levels f...
 
Enabling Active Networks Services on A Gigabit Routing Switch
Enabling Active Networks Services on A Gigabit Routing SwitchEnabling Active Networks Services on A Gigabit Routing Switch
Enabling Active Networks Services on A Gigabit Routing Switch
 
Overview
OverviewOverview
Overview
 
OPNFV EMC - Benefiting from IT & Net Ops Convergence
OPNFV EMC - Benefiting from IT & Net Ops ConvergenceOPNFV EMC - Benefiting from IT & Net Ops Convergence
OPNFV EMC - Benefiting from IT & Net Ops Convergence
 
Singapore oif transport-sdn-junjie li
Singapore oif transport-sdn-junjie liSingapore oif transport-sdn-junjie li
Singapore oif transport-sdn-junjie li
 
NFV Ecosystem Enabler - a well-enabled VNF package catalyst
NFV Ecosystem Enabler - a well-enabled VNF package catalystNFV Ecosystem Enabler - a well-enabled VNF package catalyst
NFV Ecosystem Enabler - a well-enabled VNF package catalyst
 
Unmeshing the service mesh
Unmeshing the service meshUnmeshing the service mesh
Unmeshing the service mesh
 
Federated CDNs: What every service provider should know
Federated CDNs: What every service provider should knowFederated CDNs: What every service provider should know
Federated CDNs: What every service provider should know
 
Managing Egress with Istio
Managing Egress with IstioManaging Egress with Istio
Managing Egress with Istio
 
Updates on NFV and SDN Activities from the Broadband Forum
Updates on NFV and SDN Activities from the Broadband ForumUpdates on NFV and SDN Activities from the Broadband Forum
Updates on NFV and SDN Activities from the Broadband Forum
 
Software defined optical communication
Software defined optical communicationSoftware defined optical communication
Software defined optical communication
 

En vedette

SkyeCORE - Rev Up Your OSGi Services!
SkyeCORE - Rev Up Your OSGi Services!SkyeCORE - Rev Up Your OSGi Services!
SkyeCORE - Rev Up Your OSGi Services!Wayne Williams
 
OSGi patterns v1.0.11
OSGi patterns v1.0.11OSGi patterns v1.0.11
OSGi patterns v1.0.11Velossity
 
Using OSGi for Secure Service Discovery - Antonio Kung, Founder/Director, Tri...
Using OSGi for Secure Service Discovery - Antonio Kung, Founder/Director, Tri...Using OSGi for Secure Service Discovery - Antonio Kung, Founder/Director, Tri...
Using OSGi for Secure Service Discovery - Antonio Kung, Founder/Director, Tri...mfrancis
 
Building Engaging Apps: Why you should fall in love with Push Notifications
Building Engaging Apps: Why you should fall in love with Push NotificationsBuilding Engaging Apps: Why you should fall in love with Push Notifications
Building Engaging Apps: Why you should fall in love with Push NotificationsApigee | Google Cloud
 
Using Device Abstraction Layers in OSGi based Embedded Systems - Dimitar Valt...
Using Device Abstraction Layers in OSGi based Embedded Systems - Dimitar Valt...Using Device Abstraction Layers in OSGi based Embedded Systems - Dimitar Valt...
Using Device Abstraction Layers in OSGi based Embedded Systems - Dimitar Valt...mfrancis
 
Push Notification with Unity in iOS using App42 Backend
Push Notification with Unity in iOS using App42 BackendPush Notification with Unity in iOS using App42 Backend
Push Notification with Unity in iOS using App42 BackendShepHertz
 
Device Abstraction in OSGi Based Embedded Systems - Dimitar Valtchev
Device Abstraction in OSGi Based Embedded Systems - Dimitar ValtchevDevice Abstraction in OSGi Based Embedded Systems - Dimitar Valtchev
Device Abstraction in OSGi Based Embedded Systems - Dimitar Valtchevmfrancis
 
OSGi IoT Demo @ CeBIT 2016
OSGi IoT Demo @ CeBIT 2016OSGi IoT Demo @ CeBIT 2016
OSGi IoT Demo @ CeBIT 2016mfrancis
 
Avoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldos
Avoid the chaos - Handling 100+ OSGi Components - Balázs ZsoldosAvoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldos
Avoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldosmfrancis
 
Dockerizing apps for the Deployment Platform of the Month with OSGi - David B...
Dockerizing apps for the Deployment Platform of the Month with OSGi - David B...Dockerizing apps for the Deployment Platform of the Month with OSGi - David B...
Dockerizing apps for the Deployment Platform of the Month with OSGi - David B...mfrancis
 
Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...mfrancis
 
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho DelchevWebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchevmfrancis
 
How the Bosch Group is making use of OSGi for IoT - Kai Hackbarth
How the Bosch Group is making use of OSGi for IoT - Kai HackbarthHow the Bosch Group is making use of OSGi for IoT - Kai Hackbarth
How the Bosch Group is making use of OSGi for IoT - Kai Hackbarthmfrancis
 
Pendo Series B Investor Deck External
Pendo Series B Investor Deck ExternalPendo Series B Investor Deck External
Pendo Series B Investor Deck ExternalTodd Olson
 
Tinder Pitch Deck
Tinder Pitch DeckTinder Pitch Deck
Tinder Pitch DeckRyan Gum
 
Intercom's first pitch deck!
Intercom's first pitch deck!Intercom's first pitch deck!
Intercom's first pitch deck!Eoghan McCabe
 
Contently Pitch Deck
Contently Pitch DeckContently Pitch Deck
Contently Pitch DeckRyan Gum
 

En vedette (20)

SkyeCORE - Rev Up Your OSGi Services!
SkyeCORE - Rev Up Your OSGi Services!SkyeCORE - Rev Up Your OSGi Services!
SkyeCORE - Rev Up Your OSGi Services!
 
OSGi patterns v1.0.11
OSGi patterns v1.0.11OSGi patterns v1.0.11
OSGi patterns v1.0.11
 
Using OSGi for Secure Service Discovery - Antonio Kung, Founder/Director, Tri...
Using OSGi for Secure Service Discovery - Antonio Kung, Founder/Director, Tri...Using OSGi for Secure Service Discovery - Antonio Kung, Founder/Director, Tri...
Using OSGi for Secure Service Discovery - Antonio Kung, Founder/Director, Tri...
 
Building Engaging Apps: Why you should fall in love with Push Notifications
Building Engaging Apps: Why you should fall in love with Push NotificationsBuilding Engaging Apps: Why you should fall in love with Push Notifications
Building Engaging Apps: Why you should fall in love with Push Notifications
 
Using Device Abstraction Layers in OSGi based Embedded Systems - Dimitar Valt...
Using Device Abstraction Layers in OSGi based Embedded Systems - Dimitar Valt...Using Device Abstraction Layers in OSGi based Embedded Systems - Dimitar Valt...
Using Device Abstraction Layers in OSGi based Embedded Systems - Dimitar Valt...
 
Push Notification with Unity in iOS using App42 Backend
Push Notification with Unity in iOS using App42 BackendPush Notification with Unity in iOS using App42 Backend
Push Notification with Unity in iOS using App42 Backend
 
Pro syst about us
Pro syst   about usPro syst   about us
Pro syst about us
 
Device Abstraction in OSGi Based Embedded Systems - Dimitar Valtchev
Device Abstraction in OSGi Based Embedded Systems - Dimitar ValtchevDevice Abstraction in OSGi Based Embedded Systems - Dimitar Valtchev
Device Abstraction in OSGi Based Embedded Systems - Dimitar Valtchev
 
OSGi IoT Demo @ CeBIT 2016
OSGi IoT Demo @ CeBIT 2016OSGi IoT Demo @ CeBIT 2016
OSGi IoT Demo @ CeBIT 2016
 
OSGi & Blueprint
OSGi & BlueprintOSGi & Blueprint
OSGi & Blueprint
 
Avoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldos
Avoid the chaos - Handling 100+ OSGi Components - Balázs ZsoldosAvoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldos
Avoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldos
 
Dockerizing apps for the Deployment Platform of the Month with OSGi - David B...
Dockerizing apps for the Deployment Platform of the Month with OSGi - David B...Dockerizing apps for the Deployment Platform of the Month with OSGi - David B...
Dockerizing apps for the Deployment Platform of the Month with OSGi - David B...
 
Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...
 
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho DelchevWebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
 
How the Bosch Group is making use of OSGi for IoT - Kai Hackbarth
How the Bosch Group is making use of OSGi for IoT - Kai HackbarthHow the Bosch Group is making use of OSGi for IoT - Kai Hackbarth
How the Bosch Group is making use of OSGi for IoT - Kai Hackbarth
 
Pendo Series B Investor Deck External
Pendo Series B Investor Deck ExternalPendo Series B Investor Deck External
Pendo Series B Investor Deck External
 
Tinder Pitch Deck
Tinder Pitch DeckTinder Pitch Deck
Tinder Pitch Deck
 
Intercom's first pitch deck!
Intercom's first pitch deck!Intercom's first pitch deck!
Intercom's first pitch deck!
 
Contently Pitch Deck
Contently Pitch DeckContently Pitch Deck
Contently Pitch Deck
 
BuzzFeed Pitch Deck
BuzzFeed Pitch DeckBuzzFeed Pitch Deck
BuzzFeed Pitch Deck
 

Similaire à The OSGi Complete - Pavlin Dobrev

Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...
Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...
Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...mfrancis
 
OSGi Specification Evolution - BJ Hargrave
OSGi Specification Evolution - BJ HargraveOSGi Specification Evolution - BJ Hargrave
OSGi Specification Evolution - BJ Hargravemfrancis
 
Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...
Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...
Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...mfrancis
 
Building Global Telematics System by Using OSGi Technology - Dimitar Valtchev...
Building Global Telematics System by Using OSGi Technology - Dimitar Valtchev...Building Global Telematics System by Using OSGi Technology - Dimitar Valtchev...
Building Global Telematics System by Using OSGi Technology - Dimitar Valtchev...mfrancis
 
OSGi Community Event 2010 - App Store for the Connected Home Services
OSGi Community Event 2010 - App Store for the Connected Home ServicesOSGi Community Event 2010 - App Store for the Connected Home Services
OSGi Community Event 2010 - App Store for the Connected Home Servicesmfrancis
 
OSGi Technology in the France Telecom Plugs Home Platform - Gilles Deflandre,...
OSGi Technology in the France Telecom Plugs Home Platform - Gilles Deflandre,...OSGi Technology in the France Telecom Plugs Home Platform - Gilles Deflandre,...
OSGi Technology in the France Telecom Plugs Home Platform - Gilles Deflandre,...mfrancis
 
IoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdfIoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdfGVNSK Sravya
 
Requirements For a Successful End-to-End Business Solution - Kai Hackbath, Pr...
Requirements For a Successful End-to-End Business Solution - Kai Hackbath, Pr...Requirements For a Successful End-to-End Business Solution - Kai Hackbath, Pr...
Requirements For a Successful End-to-End Business Solution - Kai Hackbath, Pr...mfrancis
 
How the OSGi Residential Specifications can help to build an ecosystem for sm...
How the OSGi Residential Specifications can help to build an ecosystem for sm...How the OSGi Residential Specifications can help to build an ecosystem for sm...
How the OSGi Residential Specifications can help to build an ecosystem for sm...mfrancis
 
IBM Z for the Digital Enterprise 2018 - Offering API channel to application a...
IBM Z for the Digital Enterprise 2018 - Offering API channel to application a...IBM Z for the Digital Enterprise 2018 - Offering API channel to application a...
IBM Z for the Digital Enterprise 2018 - Offering API channel to application a...DevOps for Enterprise Systems
 
2307 - DevBCN - Otel 101_compressed.pdf
2307 - DevBCN - Otel 101_compressed.pdf2307 - DevBCN - Otel 101_compressed.pdf
2307 - DevBCN - Otel 101_compressed.pdfDimitrisFinas1
 
Orion context broker webminar 2013 06-19
Orion context broker webminar 2013 06-19Orion context broker webminar 2013 06-19
Orion context broker webminar 2013 06-19Fermin Galan
 
What's New in IBM Streams V4.2
What's New in IBM Streams V4.2What's New in IBM Streams V4.2
What's New in IBM Streams V4.2lisanl
 
OSGi Alliance World Congress 2004 Flyer
OSGi Alliance World Congress 2004 FlyerOSGi Alliance World Congress 2004 Flyer
OSGi Alliance World Congress 2004 Flyermfrancis
 
OSGi IoT Demo - OSGi Community Event 2014
OSGi IoT Demo - OSGi Community Event 2014OSGi IoT Demo - OSGi Community Event 2014
OSGi IoT Demo - OSGi Community Event 2014mfrancis
 
SITE_6_Release_Highlights.pdf
SITE_6_Release_Highlights.pdfSITE_6_Release_Highlights.pdf
SITE_6_Release_Highlights.pdfBirodhShrestha1
 
OSGi User Forum US DC Metro
OSGi User Forum US DC MetroOSGi User Forum US DC Metro
OSGi User Forum US DC MetropjhInovex
 
OSGi user forum dc metro v1
OSGi user forum dc metro v1OSGi user forum dc metro v1
OSGi user forum dc metro v1pjhInovex
 
The OSGi Service Platform in Integrated Management Environments - Cristina Di...
The OSGi Service Platform in Integrated Management Environments - Cristina Di...The OSGi Service Platform in Integrated Management Environments - Cristina Di...
The OSGi Service Platform in Integrated Management Environments - Cristina Di...mfrancis
 
Why Collaborate? Graham Nicholls, Extrada Inc.
Why Collaborate? Graham Nicholls, Extrada Inc.Why Collaborate? Graham Nicholls, Extrada Inc.
Why Collaborate? Graham Nicholls, Extrada Inc.mfrancis
 

Similaire à The OSGi Complete - Pavlin Dobrev (20)

Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...
Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...
Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...
 
OSGi Specification Evolution - BJ Hargrave
OSGi Specification Evolution - BJ HargraveOSGi Specification Evolution - BJ Hargrave
OSGi Specification Evolution - BJ Hargrave
 
Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...
Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...
Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...
 
Building Global Telematics System by Using OSGi Technology - Dimitar Valtchev...
Building Global Telematics System by Using OSGi Technology - Dimitar Valtchev...Building Global Telematics System by Using OSGi Technology - Dimitar Valtchev...
Building Global Telematics System by Using OSGi Technology - Dimitar Valtchev...
 
OSGi Community Event 2010 - App Store for the Connected Home Services
OSGi Community Event 2010 - App Store for the Connected Home ServicesOSGi Community Event 2010 - App Store for the Connected Home Services
OSGi Community Event 2010 - App Store for the Connected Home Services
 
OSGi Technology in the France Telecom Plugs Home Platform - Gilles Deflandre,...
OSGi Technology in the France Telecom Plugs Home Platform - Gilles Deflandre,...OSGi Technology in the France Telecom Plugs Home Platform - Gilles Deflandre,...
OSGi Technology in the France Telecom Plugs Home Platform - Gilles Deflandre,...
 
IoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdfIoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdf
 
Requirements For a Successful End-to-End Business Solution - Kai Hackbath, Pr...
Requirements For a Successful End-to-End Business Solution - Kai Hackbath, Pr...Requirements For a Successful End-to-End Business Solution - Kai Hackbath, Pr...
Requirements For a Successful End-to-End Business Solution - Kai Hackbath, Pr...
 
How the OSGi Residential Specifications can help to build an ecosystem for sm...
How the OSGi Residential Specifications can help to build an ecosystem for sm...How the OSGi Residential Specifications can help to build an ecosystem for sm...
How the OSGi Residential Specifications can help to build an ecosystem for sm...
 
IBM Z for the Digital Enterprise 2018 - Offering API channel to application a...
IBM Z for the Digital Enterprise 2018 - Offering API channel to application a...IBM Z for the Digital Enterprise 2018 - Offering API channel to application a...
IBM Z for the Digital Enterprise 2018 - Offering API channel to application a...
 
2307 - DevBCN - Otel 101_compressed.pdf
2307 - DevBCN - Otel 101_compressed.pdf2307 - DevBCN - Otel 101_compressed.pdf
2307 - DevBCN - Otel 101_compressed.pdf
 
Orion context broker webminar 2013 06-19
Orion context broker webminar 2013 06-19Orion context broker webminar 2013 06-19
Orion context broker webminar 2013 06-19
 
What's New in IBM Streams V4.2
What's New in IBM Streams V4.2What's New in IBM Streams V4.2
What's New in IBM Streams V4.2
 
OSGi Alliance World Congress 2004 Flyer
OSGi Alliance World Congress 2004 FlyerOSGi Alliance World Congress 2004 Flyer
OSGi Alliance World Congress 2004 Flyer
 
OSGi IoT Demo - OSGi Community Event 2014
OSGi IoT Demo - OSGi Community Event 2014OSGi IoT Demo - OSGi Community Event 2014
OSGi IoT Demo - OSGi Community Event 2014
 
SITE_6_Release_Highlights.pdf
SITE_6_Release_Highlights.pdfSITE_6_Release_Highlights.pdf
SITE_6_Release_Highlights.pdf
 
OSGi User Forum US DC Metro
OSGi User Forum US DC MetroOSGi User Forum US DC Metro
OSGi User Forum US DC Metro
 
OSGi user forum dc metro v1
OSGi user forum dc metro v1OSGi user forum dc metro v1
OSGi user forum dc metro v1
 
The OSGi Service Platform in Integrated Management Environments - Cristina Di...
The OSGi Service Platform in Integrated Management Environments - Cristina Di...The OSGi Service Platform in Integrated Management Environments - Cristina Di...
The OSGi Service Platform in Integrated Management Environments - Cristina Di...
 
Why Collaborate? Graham Nicholls, Extrada Inc.
Why Collaborate? Graham Nicholls, Extrada Inc.Why Collaborate? Graham Nicholls, Extrada Inc.
Why Collaborate? Graham Nicholls, Extrada Inc.
 

Plus de mfrancis

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...mfrancis
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)mfrancis
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)mfrancis
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruumfrancis
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...mfrancis
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...mfrancis
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...mfrancis
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)mfrancis
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...mfrancis
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...mfrancis
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...mfrancis
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)mfrancis
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)mfrancis
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)mfrancis
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...mfrancis
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...mfrancis
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)mfrancis
 

Plus de mfrancis (20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
 

Dernier

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Dernier (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

The OSGi Complete - Pavlin Dobrev

  • 1. © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 | 17 March 2008 The OSGi Complete Dr. Pavlin Dobrev Research and Development Manager, ProSyst Labs EOOD Eclipse Equinox Committer p.dobrev@prosyst.com Stoyan Boshev Department Manager Development Tools, ProSyst Labs EOOD Eclipse Equinox Committer s.boshev@prosyst.com
  • 2. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Contents • Introduction and Services Overview • OSGi Wire Admin Service Specification • OSGi Declarative Services Specification • OSGi IO Connector Service Specification • OSGi Initial Provisioning • Conclusions and Future Work
  • 3. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Introduction • The aim of the tutorial is to present several not well known OSGi services and to promote them to the Eclipse community. • Special attention will be given to the code snippets and programming examples. • The applications presented here are based on Equinox.
  • 4. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Donated Services from ProSyst • Implementations of:  OSGi Wire Admin Service Specification  OSGi Declarative Services Specification  OSGi IO Connector Service Specification  OSGi Initial Provisioning • Quality of the implementations:  Production ready code used in many projects  All services successfully pass the corresponding OSGi test cases.
  • 5. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Donation History • EclipseCon 2007 – ProSyst declares the intention for donation of missing OSGi Services implementations. • July 2007 – Service code is contributed to Equinox Incubator. • September 2007 – All IP logs are resolved. • February 2008 – after successfully passed Graduation Review all components will be included in the Ganymede Simultaneous Release started from Milestone 6. The components can be downloaded from Eclipse Equinox web site. • Pavlin Dobrev and Stoyan Boshev will support them as committers.
  • 6. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Service Implementations Overview 1/2 • OSGi Wire Admin Service Specification  An administrative service that is used to control a wiring topology  Used to wire components that produce data to components which consume data. • OSGi IO Connector Service Specification  Adopts the javax.microedition.io package as a basic communication infrastructure.  In J2ME, the Connector framework can be extended by the vendor of the Virtual Machine, but cannot be extended at run-time by bundle code.  This specification defines a service that adopts the flexible model of the Connector framework, but allows bundles to extend it.
  • 7. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Service Implementations Overview 2/2 • OSGi Declarative Services Specification  Uses a declarative model for publishing, finding and binding to OSGi services.  Simplifies the task of authoring OSGi services by performing the work of registering the service and handling service dependencies. • OSGi Initial Provisioning Specification  Defines how the Management Agent can make its way to the Service Platform, and gives a structured view of the problems and their corresponding resolution methods.  Enables the management of a Service Platform by an Operator, and (optionally) to hand over the management of the Service Platform later to another Operator.
  • 8. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Wire Admin Service Specification - Theory • The Wire Admin service is an administrative service that is used to control a wiring topology in the OSGi Service Platform • Bundles participate in this wiring process by registering services that produce or consume data. The Wire Admin service wires the services that produce data to services which consume data • The Wire Admin service is designed to cooperate closely with the Configuration Admin service.
  • 9. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Wire Admin – Problems to be Solved • When a bundle wants to use a service and there are several implementations available, the bundle will receive one at random. • After a bundle has started using a service, the framework is no longer in control of the volume or type of data that is transferred. • If an administrator wants to make a bundle stop using a service, the only way is either to stop the producer or the consumer of the service.
  • 10. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Wire Admin Service Specification - Solution • Wire Admin Service is between the producer and the consumer of the service • The Wire Admin Service controls the connection and the data • Typical data-producing service can be, for example, one that represents some physical device. It produces information about its current status. • Typical data-consumers can be detectors, gauges, user interfaces, etc.
  • 11. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Wire Admin Service – Objects 1/4 • Producer - A service object that generates information to be used by a Consumer service • Consumer - A service object that receives information generated by a Producer service • Wire - An object created by the Wire Admin service that defines an association between a Producer service and a Consumer service. Multiple Wire objects can exist between the same Producer and Consumer pair • WireAdmin - The service that provides methods to create, update, remove, and list Wire objects.
  • 12. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Wire Admin Service – Objects 2/4 • WireAdminListener -A service that receives events from the Wire Admin service when the Wire object is manipulated or used. • WireAdminEvent - The event that is sent to a WireAdminListener object, describing the details of what happened. • Configuration Properties - Properties that are associated with a Wire object and that contain identity and configuration information set by the administrator of the Wire Admin service. • PID - The Persistent Identity as defined in the Configuration Admin specification.
  • 13. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Wire Admin Service – Objects 3/4 • Flavors - The different data types that can be used to exchange information between Producer and Consumer services. • Composite Producer/Consumer - A Producer/ Consumer service that can generate/accept different kinds of values. • Envelope - An interface for objects that can identify a value that is transferred over the wire. Envelope objects contain also a scope name that is used to verify access permissions. • Scope - A set of names that categorizes the kind of values contained in Envelope objects for security and selection purposes.
  • 14. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Wire Admin Service – Objects 4/4 • Basic Envelope - A concrete implementation of the Envelope interface. • WirePermission - A Permission sub-class that is used to verify if a Consumer service or Producer service has permission for specific scope names. • Composite Identity - A name that is agreed between a composite Consumer and Producer service to identify the kind of objects that they can exchange.
  • 15. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 org.osgi.service.wiring package: Source: OSGi Specification
  • 16. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Creating a Producer Service 1/2 • A producer service must implement and register the org.osgi.service.wireadmin.Producer interface. Its polled(Wire) method should return the data output sent across the wires. • The consumersConnected(Wire[]) method actualizes the list of connected wires.
  • 17. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Creating a Producer Service 2/2 • Each producer may be registered with the following properties:  org.osgi.framework.Constants.SERVICE_PID - the service PID of the producer (mandatory)  WireConstants.WIREADMIN_PRODUCER_FLAVORS - the object classes created by the producer. It takes Class[] values.  WireConstants.WIREADMIN_PRODUCER_FILTERS - (if the producer will handle the filtering) the data filters.  WireConstants.WIREADMIN_PRODUCER_COMPOSITE - (for composite producers only) the service PIDs of the composite consumers it will communicate with.  WireConstants.WIREADMIN_PRODUCER_SCOPE - (for composite producers only) the data types the producer will create.
  • 18. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Example Producer 1/2 • The following example creates a producer for String output. This is indicated by the value of the org.osgi.service.wireadmin.WireConstants.WIREADMIN_PRODU CER_FLAVORS registration property. The service is also registered with the producer.all PID. The only output it sends is a single String. It will be received by consumers connected with wires to this producer. ... public void start (BundleContext bc) throws BundleException { Hashtable props = new Hashtable(); //the producer will be sending String data (flavors) Class[] flavors = new Class[] {String.class}; props.put(WireConstants.WIREADMIN_PRODUCER_FLAVORS, flavors); //the producer PID property props.put("service.pid", "producer.all"); reg = bc.registerService(Producer.class.getName(), this, props); }
  • 19. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Example Producer 2/2 /** If there are connected wires, updates them with the produced values */ public void consumersConnected(Wire[] wires) { if (wires != null) { for (int i = 0; i < wires.length; i++) { wires[i].update(polled(wires[i])); } } } /** This method is responsible for creating the output */ public Object polled(Wire wire) { String output = "Hello there! This is the producer speaking!"; return output; } }
  • 20. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Filtering the Data Output • By the producer - The producer can be implemented so as to filter the data for sending (its polled method should be implemented so as to produce only values corresponding to the necessary filter). In this case, it must be registered with the WireConstants.WIREADMIN_PRODUCER_FILTERS property. • By the connecting wire - In this case, the Wire Admin will create the Wire with the WireConstants.WIREADMIN_FILTER property; the producer must NOT have the WireConstants.WIREADMIN_PRODUCER_FILTERS property simultaneously!
  • 21. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Filtering the Data Output by the Producer ... Hashtable props = new Hashtable(3); Class[] flavors = new Class[] {Double.class}; //the producer registers for Double data output props.put(WireConstants.WIREADMIN_PRODUCER_FLAVORS, flavors); props.put(WireConstants.SERVICE_PID, "producer.that.filters"); // set this registration property with some value //to indicate that filtering is performed by the producer props.put(WireConstants.WIREADMIN_PRODUCER_FILTERS, "some.value"); bc.registerService(Producer.class.getName(), this, props); ... //the data is sent only if it is no smaller than 25 public Object polled(Wire wire) { return (currentTemperature >= 25.d) ? new Double(currentTemperature) : null; }
  • 22. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Value Based Filters • WireConstants.WIREVALUE_CURRENT ("wirevalue.current") - Indicates the current value available on the wire • WireConstants.WIREVALUE_PREVIOUS ("wirevalue.previous") - Indicates the previous value passed across the wire • WireConstants.WIREVALUE_DELTA_ABSOLUTE ("wirevalue.delta.absolute") - The absolute (always positive) difference between the last update and the current value • WireConstants.WIREVALUE_DELTA_RELATIVE ("wirevalue.delta.relative") - The relative difference is (current_value - previous_value ) / current. • WireConstants.WIREVALUE_ELAPSED ("wirevalue.elapsed") - for constructing time-based filters. It represents the elapsed time in milliseconds between the current value and the previous value sent by the producer.
  • 23. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Creating a Consumer Service • A consumer service must implement and register the org.osgi.service.wireadmin.Consumer interface. It may have the following list of registration properties:  org.osgi.framework.Constants.SERVICE_PID - the service PID of the consumer (mandatory)  WireConstants.WIREADMIN_CONSUMER_FLAVORS - the consumed data object classes (flavors).  WireConstants.WIREADMIN_CONSUMER_COMPOSITE - (only for composite consumers) the service PIDs of the producers this service will communicate with  WireConstants.WIREADMIN_CONSUMER_SCOPE - (only for composite consumers) the list of descriptive data types consumed by the service.
  • 24. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Example Consumer ... public void start(BundleContext bc) throws BundleException { Hashtable prop = new Hashtable(); //this property shows that the consumer will accept any data types prop.put(WireConstants.WIREADMIN_CONSUMER_FLAVORS, new Class[] {Object.class}); //the identifier property of the consumer prop.put("service.pid", "consumer.all"); //registering the service on the framework reg = bc.registerService(Consumer.class.getName(), this, prop); }
  • 25. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Example Consumer /** Watches the list of wires*/ public void producersConnected(Wire[] wires) { if (wires == null) { System.out.println("Not connected to any wires"); } else { System.out.println("Connected to " + wires.length + " wires"); } } /** Receives the new data whenever such are available */ public void updated(Wire wire, Object value) { System.out.println("Updated " + wire + " with value " + value); }
  • 26. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Creating Wire using Wireadmin // getting a WireAdmin service reference waRef = bc.getServiceReference(WireAdmin.class.getName()); // getting the WireAdmin Service Implementation wa = (WireAdmin) bc.getService(waRef); // create wire wire = wa.createWire("producer.all", "consumer.all", new Hashtable());
  • 27. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Creating Wire // getting a Configuration Admin service reference saRef = bc.getServiceReference(ConfigurationAdmin.class.getName()); ca = (ConfigurationAdmin) bc.getService(saRef); try { // Create Factory Configuration c=ca.createFactoryConfiguration("equinox.wireadmin.fpid", "initial@reference:file:plugins/org.eclipse.equinox.wireadmin_0.1.0.jar/") ; Hashtable props = new Hashtable(); props.put("wireadmin.consumer.pid", "consumer.all"); props.put("wireadmin.producer.pid", "producer.all"); c.update(props); } catch (IOException e) { throw new BundleException("Configuration Admin Exception!" + e.getMessage()); }
  • 28. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Creating Composite Producers/Consumers 1/2 • Composite consumers and producers have additional registration properties besides those for ordinary producers and consumers. See the corresponding descriptions for details. • Such composite services exchange data in the form of org.osgi.service.wireadmin.Envelope objects (flavors). An Envelope wraps a number of data types, for example: "front left door status", "rear left door status" and "airbag status".
  • 29. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Creating Composite Producers/Consumers 2/2 • The org.osgi.service.wireadmin package provides the following class implementing the Envelope interface:  BasicEnvelope - this class can be used as a basic implementation of the Envelope interface. Source: OSGi Specification
  • 30. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Example – Implementing Composite Producer . . . private String[] scope = new String[] {"current.date","hello","bye"}; private Class[] flavors = new Class[] {Envelope.class}; . . . /** Registering the service with the necessary props */ java.util.Hashtable props = new java.util.Hashtable(); //the data types transmitted by this producer props.put(WireConstants.WIREADMIN_PRODUCER_SCOPE,scope); props.put(org.osgi.framework.Constants.SERVICE_PID,"test.producer"); //this property indicates the PIDs of the consumers that the producer will communicate with props.put(WireConstants.WIREADMIN_PRODUCER_COMPOSITE, new String[] {"test.consumer"}); //for composite services, the value of this property must be Envelope props.put(WireConstants.WIREADMIN_PRODUCER_FLAVORS, flavors); bc.registerService(Producer.class.getName(),this,props); . . . public Object polled(Wire wire) { String date = new java.util.Date().toString(); BasicEnvelope envelope = new BasicEnvelope(date,"test.producer","current.date"); System.out.println("Message from the producer: My current date is "+envelope.getValue()); return envelope; }
  • 31. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Creating a WireAdmin Listener • The WireAdminListener interface allows you to receive WireAdminEvent-s notifying of changes in the state of the wire. The WireAdminEvent class provides the following types of events and their correspondent class fields:  creating a new Wire object - WIRE_CREATED  connecting an existing Wire object - WIRE_CONNECTED  updating an existing Wire object with new properties - WIRE_UPDATED  transferring a new value over the Wire object - WIRE_TRACE  disconnecting an existing Wire object - WIRE_DISCONNECTED  deleting an existing wire - WIRE_DELETED  a Producer service method has thrown an exception - PRODUCER_EXCEPTION  a Consumer service method has thrown an exception - CONSUMER_EXCEPTION
  • 32. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Creating a WireAdmin Listener - Code Example public void start(BundleContext bc) { //bitwise OR of the event types Integer bitmask = new Integer(WireAdminEvent.PRODUCER_EXCEPTION | WireAdminEvent.CONSUMER_EXCEPTION); Hashtable props = new Hashtable(); props.put(WireConstants.WIREADMIN_EVENTS, bitmask); reg = bc.registerService(WireAdminListener.class.getName(), this, props); } // WireAdminListener implementation public void wireAdminEvent(WireAdminEvent e) { switch (e.getType()) { case WireAdminEvent.PRODUCER_EXCEPTION: // do some work break; case WireAdminEvent.CONSUMER_EXCEPTION: // do some work break; } } }
  • 33. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi WireAdmin Summary • Used to wire components that produce data to components which consume data • Data can be:  Simple  Composite • Data can be filtered:  By the producer  By the Wire itself • Additionally you can listen for WireAdmin Events
  • 34. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Declarative Services Specification • What are Declarative Services?  Service component model  Represent components and their dependencies to services  A component may provide a service and/or may consume a service  Declarative representation in XMLs  Service component runtime (SCR)  Processes the components of the activated bundles  Manages the lifecycle of the components based on changes in: dependent services configurations (Configuration Admin Service Specification) bundles state
  • 35. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Service Component Runtime relations Source: OSGi Specification
  • 36. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Component Life Cycle 1/2 • Enabled state  It is bound to its bundle life cycle  Can be initially controlled by the component description (attribute “enabled”)  Can be controlled programatically by using the ComponentContext methods enableComponent(String) and disableComponent(String) • Satisfied state  A component is satisfied when:  It is enabled  All of its references are satisfied
  • 37. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Component Life Cycle 2/2 • Activation  Activating a component consists of the following steps performed by SCR:  Load the component implementation class  Create the component instance and component context  Bind the target services  Call the activate method, if present • Deactivation  Deactivating a component consists of the following steps performed by SCR:  Call the deactivate method, if present  Unbind any bound services  Release all references to the component instance and component context
  • 38. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 First steps using Declarative services • Steps required to create a component that provides a service:  Create the service interface  Create the implementation of the interface  Write the component description XML  Add the component description to the “Service-Component” manifest header
  • 39. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Declarative Services – Step By Step 1,2/4 1. Write the service interface: package simple.service; public interface HelloService { public void hello(); } 2. Write the service implementation: package simple.service.impl; import simple.service.HelloService; public class HelloServiceImpl implements HelloService { public void hello() { System.out.println("Hello components!"); } }
  • 40. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Provide an XML with the component description 3/4 <?xml version="1.0" encoding="UTF-8"?> <scr:component name="HelloServiceComponent" xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0"> <!-- The component's implementation class--> <implementation class="simple.service.impl.HelloServiceImpl"/> <service> <!--The interface of the service provided by the component--> <provide interface="simple.service.HelloService"/> </service> </scr:component>
  • 41. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Header in Bundle Manifest 4/4 • Use Service-Component header in the manifest to declare the XML description: Service-Component: <path to the XML document's location> • For example Service-Component: OSGI-INF/Hello.xml
  • 42. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 References to services 1/4 • Accessing services  Lookup strategy  Component implementations must have activate(ComponentContext) and deactivate(ComponentContext) methods  use ComponentContext to locate services  Event strategy (binder methods)  The component defines bind and unbind methods for each reference  These methods can have as parameter ServiceReference or the type specified by the reference’s interface attribute
  • 43. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 References to services 2/4 • Reference cardinality  “cardinality” is an optional attribute of the “reference” element  It defines the reference’s multiplicity and optionality  Possible cardinality values: 0..1 – Optional and unary 1..1 – Mandatory and unary (Default) 0..n – Optional and multiple 1..n – Mandatory and multiple
  • 44. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 References to services 3/4 • Reference policy  Static  The default policy of a reference  Components are reactivated on each change of its reference  Simple but expensive  Not suitable for references with cardinality 0..n or 1..n  Dynamic  More complex to handle  SCR updates the bound service of a component without reactivating it
  • 45. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 References to services 4/4 • Selecting target services  Use the “target” attribute to define a filter to constrain the services that match the reference  The “target” is an LDAP filter Example: <reference name=“AppFactory" interface="org.osgi.service.component.ComponentFactory" target="(component.factory=my.application)" />
  • 46. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Lookup Strategy for Getting Services 1/3 1. Write a reference element in the component's description XML to declare the referenced service(s) 2. Get the component's ComponentContext object passed as an argument to the component's activate() method 3. Call the locateService or locateServices method of the ComponentContext
  • 47. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Lookup Strategy for Getting Services 2/3 <?xml version="1.0" encoding="UTF-8"?> <scr:component name="HelloServiceLookup" xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0"> <implementation class="simple.service.reference.HelloServiceLookup "/> <reference name="helloService" interface="simple.service.HelloService" /> </scr:component>
  • 48. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Lookup Strategy for Getting Services 3/3 public class HelloServiceLookup { ComponentContext cc; protected void activate(ComponentContext ctxt){ this.cc = ctxt; } public void useService() { HelloService helloService = (HelloService) cc.locateService("helloService"); helloService.hello(); } protected void deactivate(ComponentContext ctxt){ this.cc = null; } }
  • 49. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Event Strategy for Getting Services 1/3 1. Write binding and unbinding methods 2. Declare them in the reference element of the component description 3. SCR passes the referenced service as an argument of the bind and unbind methods
  • 50. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Event Strategy for Getting Services 2/3 ... public class HelloServiceBind { HelloService helloService; public void setHelloService(HelloService helloService){ this.helloService = helloService; } public void unsetHelloService(HelloService helloService){ this.helloService = null; } protected void activate(ComponentContext ctxt){ //note that lookupService() is not called helloService.hello(); } ...
  • 51. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Event Strategy for Getting Services 3/3 <?xml version="1.0" encoding="UTF-8"?> <scr:component name="HelloServiceBind" xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0"> <implementation class="simple.service.reference.HelloServiceBind"/> <reference name="helloService" interface="simple.service.HelloService" bind="setHelloService" unbind="unsetHelloService" /> </scr:component>
  • 52. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Delayed / Immediate Components •Delayed components are lazily instantiated •A component is delayed in case: It provides a service It does not have the attribute immediate=“true” in its XML description •Immediate components are instantiated as soon as they become satisfied
  • 53. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Factory Components • Factory component creates component configurations on demand • Factory component is specified by using the “factory” attribute in the component’s element • org.osgi.service.component.ComponentFactory service is registered for each factory component • ComponentFactory.newInstance(Dictionary) can be used for creating new component instances
  • 54. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Component Properties • Component properties are put as service properties when SCR registers a component service • They can be used in the “target” attribute of a reference for constraining the set of services that match • SCR always adds the property “component.name” • Properties can be set/overriden by:  The argument of ComponentFactory.newInstance(Dictionary)  Configuration object (retrieved by Configuration Admin)  The component description
  • 55. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Component Factory Example <?xml version="1.0" encoding="UTF-8"?> <scr:component name="HelloServiceComponentFactory" factory="hello.component.factory" xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0"> <!-- The component's implementation class--> <implementation class="simple.service.impl.HelloServiceImpl"/> <service> <!--The interface of the service provided by the component--> <provide interface="simple.service.HelloService"/> </service> <property name="SomeProperty" value="initial value"/> <property name="instanceID" type="Integer" value="0"/> </scr:component>
  • 56. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Advantages of Declarative Services • Solves crucial problems of large systems like  Startup time  Memory footprint • Deals with the complexity of handling the dynamism of services  Code simplification  Error preventive • Can support components which are not OSGi aware
  • 57. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Available tools for DS • There are no available tools for DS at this moment • DS support will become part of PDE (not in Eclipse 3.4) • ProSyst will provide DS Editor plugin for Eclipse 3.4
  • 58. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi IO Connector Service Specification • OSGi IO Connector Service specification adopts the Java 2 Micro Edition (J2ME) javax.microedition.io packages as a basic communications infrastructure. In J2ME, this API is also called the Connector framework. • ConnectorService – The service that performs the same function - creating connections from different providers - as the static methods in the Connector framework of javax.microediton.io. • ConnectionFactory – A service that extends the Connector service with more schemes. • Scheme – A protocol or device that is supported in the Connector framework.
  • 59. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Source: OSGi Specification
  • 60. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi IO Connector Service Specification - URI • Examples:  sms://+46705950899;expiry=24h;reply=yes;type=9  datagram://:53  socket: //www.acme.com:5302  comm://COM1;baudrate=9600;databits=9  file:c:/autoexec.bat • The same interfaces can be used for communication via TCP/IP, UDP, SMS, USB/COMM, Bluetooth
  • 61. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 How IO Connector Works
  • 62. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 How the IO Connector Service Creates Connections
  • 63. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Connection Types (javax.microedition.io package)
  • 64. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi IO Connector Service – Example • Server server = (StreamConnectionNotifier)connService.open( "socket://:3333", ConnectorService.READ); connection = server.acceptAndOpen(); DataInputStream inputStream = connection.openDataInputStream(); • Client connection = (StreamConnection)connService.open( "socket://localhost:3333"); DataOutputStream outputStream = connection.openDataOutputStream(); //the simple String data sent to the server outputStream.writeUTF("Hello there from the client!"); • Socket Factory Implementation
  • 65. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi IO Connector Service – Summary • In J2ME, the Connector framework can be extended by the vendor of the Virtual Machine, but cannot be extended at run-time by bundle code. The defined IO Connector service goes behind this restriction and allows bundles to add new connection factories dynamically. • The same interfaces can be used for communication via TCP/IP, UDP, SMS, USB/COMM, Bluetooth
  • 66. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Initial Provisioning - terminology • Management Agent – A set of one or more bundles that run on the OSGi framework and communicate with the Remote Management System to provide management of the Service Platform • Initial Provisioning - The process in which an OSGi Framework is provisioned with a Management Agent
  • 67. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Initial Provisioning - entities • Provisioning Service - A service registered with the OSGi Framework that supports supplying of the initial configuration needed to trigger the initial provisioning process and provides information about the initial provisioning to the Management Agent • Provisioning Dictionary - A Dictionary object holding the initial provisioning configuration. This dictionary is filled through the Provisioning Service methods and with information from a ZIP files that are loaded during initial setup
  • 68. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 org.osgi.service.provisioning package: Source: OSGi Specification
  • 69. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Initial Provisioning Sequence (ProSyst mPRM) mPRM OSGi Device Initial Provisioning Service Initial Provisioning Server OSGi DM Adapter Set Provisioning URL Get Provisioning Data by URL Install mPRM MA Loader Platform info about device Initiate Management Session Install Optional Agent bundles Read Config Optional Management Agents Install MA Loader Bundle InstallList of bundles & config. settings Core Management Agent Core Management Agent Install Set config
  • 70. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Initial Provisioning Procedure 1/2 1. The Initial Provisioning Service is supplied with an initial request URL 2. The Initial Provisioning Service sends request to the Management System using the initial request URL 3. Management System returns a ZIP file containing entries that are placed in the Provisioning Dictionary object and stored persistently.
  • 71. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Initial Provisioning Procedure 2/2 4. The Provisioning Service installs (but does not start) all entries in the ZIP file that are typed as a bundle or bundle-url. 5. If the ZIP file contains PROVISIONING_START_BUNDLE entry the Provisioning Service starts the previously installed bundle under the location which is the value of that entry. 6. If the ZIP file contains PROVISIONING_REFERENCE entry then the entire procedure is repeated using the value of this entry as a new initial request URL.
  • 72. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 What is covered by the OSGi Specification • The Initial Provisioning Assignment algorithm • The format of the ZIP file and the allowed types of the entries - String, byte[], bundle and bundle-url • A set of predefined entry names with special meaning - PROVISIONING_REFERENCE, PROVISIONING_SPID, PROVISIONING_START_BUNDLE, PROVISIONING_ROOTX509 • The API of the Provisioning Service for reading and modifying the properties of the Provisioning Dictionary by the Management Agent. • Optional protocol mappings over HTTP, HTTPS and RSH
  • 73. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 What is not standardized by the OSGi • The way for providing the Provisioning Service with the initial request URL. Possible variants are: staged by the manufacturer, input by the user or obtained from a SIM-card. • The protocol used in the Provisioning Assignment. The protocol is specified by the schema of the initial URL and can be any public or proprietary protocol as far as it is supported by the Framework. Examples - http(s)://, file://, smart-card:// • The number and names of properties which could be assigned to the Provisioning Dictionary. Thus different Management Agents may be configured with a different set of properties.
  • 74. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 OSGi Initial Provisioning - avdantages • Policy Free - The Initial Provisioning Service provides business model agnostic solution for Remote Management. None of the affected parties (Operators, SPS Manufacturers, etc.) is forced into any particular business model. • Interoperability - The Initial Provisioning permit arbitrary interoperability between management systems and OSGi enabled devices. • Flexible - The initial provisioning model is open as possible, while still achieving interoperability.
  • 75. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Conclusion, Resources and Future Work • Eclipse Equinox Web Site http://www.eclise.org/equinox • ProSyst Developer’s Zone http://dz.prosyst.com • Pavlin Dobrev and Stoyan Boshev will support the donated services as committers
  • 76. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Contacts Thank you! For further information please contact us! ProSyst Software GmbH Dürener Straße 405 D-50858 Cologne, Germany Tel. +49 221 6604-0 Fax +49 221 6604-660 info@prosyst.com www.prosyst.com
  • 77. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Thank you!
  • 78. The OSGi Complete | © 2008 by ProSyst Software GmbH; made available under the EPL v1.0 Legal Notices • mPRM is trademark or registered trademark of ProSyst Software GmbH in Germany and other countries • Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both • Other company, product, or service names may be trademarks or service marks of others

Notes de l'éditeur

  1. The goal of the OSGi Wire Admin Service is to enable services that generate some sort of data to send it to the services interested in the same data. The data can be updated dynamically so that the interested services can receive the new values regularly. The Wire Admin Service provides configuration data (in the OSGi Configuration Admin Service) through which new virtual connections (known as wires) can be established when a new service needs to receive the data output. Useless wires can easily be removed. The main advantage of using the Wire Admin service is that it decreases the need for wired bundles to have context-specific knowledge about the opposite party. They never need to communicate with each other directly but through the Wire Admin Service. A typical data-producing service can be, for example, one that represents some physical device. It produces information about its current status. Typical data-consumers can be detectors, gauges, user interfaces, etc.
  2. Each service which is supposed to produce some data output is referred to as producer. A producer must register the org.osgi.service.wireadmin.Producer interface. Details about creating producers and working with them are available in the Creating a Producer Service part. The service which is supposed to consume the produced data is called consumer. A consumer must be registered under the org.osgi.service.wireadmin.Consumer interface. A consumer for some data type can also be a producer for another data type. More information about consumers is available in Creating a Consumer Service. In the most common case, there should be a separate producer/consumer couple for each type of transferred information. However, when there are too many data flows to be handled, it is possible for a producer to be responsible for the generation of several data types, and for a consumer to receive more than one information type. These are called composite producer and composite consumer respectively. They are described in more details in the Creating Composite Producers and/or Consumers part of this document. Note: Data type does not mean the Java object class of the transferred information! Data type refers to the logical description of the information, for example: door lock status, camera status, etc. The Java object classes that wrap the data are known as flavors. The wire between a consumer and producer couple is represented by an org.osgi.service.wireadmin.Wire object, created by the Wire Admin. A wire is never opened automatically but when the user explicitly requests it (see Creating Wires for details). More than one wire may be opened between a producer/consumer couple. By default, the data sent across the wire is filtered by the Wire object itself. Filtering in this case implies the rate at which new data will be delivered (there could be time-based and value-based filters with LDAP syntax). The filtering can also be handled by the producer itself. In such case, the Wire object does not perform any filtering. Both filtering ways are described in the Filtering the Data Output part. All wires are managed by the Wire Admin service. It is the sole party that can create, delete or update wires. Producers and consumers do not have the right to manage wires. Producers, consumers and wires can have different registration properties which distinguish them and allow them to be obtained through LDAP filtering. These properties are defined as constants in org.osgi.service.wireadmin.WireConstants. In addition, both consumers and producers must have the org.osgi.framework.Constants.SERVICE_PID (&amp;quot;service.pid&amp;quot;) property.
  3. A producer service must implement and register the org.osgi.service.wireadmin.Producer interface. Its polled(Wire) method should return the data output sent across the wires. The consumersConnected(Wire[]) method actualizes the list of connected wires. Each producer must be registered with the following properties: org.osgi.framework.Constants.SERVICE_PID - The service PID of the producer WireConstants.WIREADMIN_PRODUCER_FLAVORS - The object classes created by the producer. It takes Class[] values. WireConstants.WIREADMIN_PRODUCER_FILTERS - (If the producer will handle the filtering) the data filters. WireConstants.WIREADMIN_PRODUCER_COMPOSITE - (For composite producers only) the service PIDs of the composite consumers it will communicate with. WireConstants.WIREADMIN_PRODUCER_SCOPE - (For composite producers only) the data types the producer will create. The following example creates a producer for String output. This is indicated by the value of the org.osgi.service.wireadmin.WireConstants.WIREADMIN_PRODUCER_FLAVORS registration property. The service is also registered with the producer.all PID. The only output it sends is a single String. It will be received by consumers connected with wires to this producer.
  4. OSGi Communication API Overview The communication API of OSGi is defined for all bundles that require connectivity to external computers or devices. It uses the J2ME Connection Framework, represented by the javax.microedition.io API. This model is based on a Connector class which manages many different connection implementors. The OSGi Communication API replaces the javax.microedition.io.Connector class from J2ME with its own ConnectorService interface (org.osgi.service.io.ConnectorService) available as a service in the framework. This is necessary for the needs of the OSGi Service Framework model. The OSGi IO Connector Service manages the available connection implementations and creates connections requested by bundles. Services which need to create connections must use the IO Connector Service. They need NOT work directly with the connection implementors. The communication implementations are registered as services called &amp;quot;connection factories&amp;quot;. They are represented by the org.osgi.service.io.ConnectionFactory interface. Each connection factory declares the types of connections it implements by registering for a particular scheme. A scheme is the protocol or pattern of communication implemented. A bundle which demands a connection must pass to the IO Connector Service a valid Uniform Resource Identifier (URI) starting with the expected scheme. The scheme is the part of the URI before the first &amp;quot;:&amp;quot;. When the IO Connector Service receives the URI, it parses it and then redirects the URI to the appropriate connection factory. Each bundle that needs to communicate must invoke some of the open methods of the IO Connector Service. The connection factory found by the Connector Service will create a javax.microedition.io.Connection object.
  5. The IO Connector Service creates each connection by invoking the connection factory&amp;apos;s createConnection method. Before the connection is initiated, the Connector Service parses the requested URI and then places its components into a Dictionary, so that the ConnectionFactory will be able to get only the components it needs. A connection has three modes: read, write and read&amp;write. They are defined as constants in the ConnectorService interface and can be passed as a parameter to the open method. If no mode is passed, the read&amp;write mode is implied.
  6. Connection Types The generic connection interface obtained through the IO Connector Service is javax.microedition.io.Connection. However, this interface is not convenient to use because it contains only one method: the close() method. The open method is not defined here because the opening of a connection is always handled by the IO Connector Service. The javax.microedition.io package contains a set of much more convenient connections extending the generic interface. The figure shows the connection hierarchy in the package.