public interface Broker
Consumer
s and Provider
s, store provider and
consumer specific context and functionality registration via
Broker.ConsumerSession
and provide access to infrastructure services, which
removes direct dependencies between providers and consumers.
The services are exposed via session.
Broker.ConsumerSession
and Broker.ProviderSession
Modifier and Type | Interface and Description |
---|---|
static interface |
Broker.ConsumerSession
Consumer specific access to the SAL functionality. |
static interface |
Broker.ProviderSession
Provider specific access to the SAL functionality. |
Modifier and Type | Method and Description |
---|---|
Broker.ConsumerSession |
registerConsumer(Consumer cons)
Registers the
Consumer , which will use the SAL layer. |
Broker.ConsumerSession |
registerConsumer(Consumer cons,
org.osgi.framework.BundleContext context)
Deprecated.
|
Broker.ProviderSession |
registerProvider(Provider prov)
Registers the
Provider , which will use the SAL layer. |
Broker.ProviderSession |
registerProvider(Provider prov,
org.osgi.framework.BundleContext context)
Deprecated.
|
Broker.ConsumerSession registerConsumer(Consumer cons)
Consumer
, which will use the SAL layer.
During the registration, the broker obtains the initial functionality
from consumer, using the Consumer.getConsumerFunctionality()
, and
register that functionality into system and concrete infrastructure
services.
Note that consumer could register additional functionality at later point by using service and functionality specific APIs.
The consumer is required to use returned session for all communication
with broker or one of the broker services. The session is announced to
the consumer by invoking
Consumer#onSessionInitiated(ConsumerSession)
.
cons
- Consumer to be registered.IllegalArgumentException
- If the consumer is null
.IllegalStateException
- If the consumer is already registered.@Deprecated Broker.ConsumerSession registerConsumer(Consumer cons, org.osgi.framework.BundleContext context)
Broker.ProviderSession registerProvider(Provider prov)
Provider
, which will use the SAL layer.
During the registration, the broker obtains the initial functionality
from consumer, using the Provider.getProviderFunctionality()
, and
register that functionality into system and concrete infrastructure
services.
The consumer is required to use returned session for all
communication with broker or one of the broker services. The session is
announced to the consumer by invoking
Provider#onSessionInitiated(ProviderSession)
.
prov
- Provider to be registered.IllegalArgumentException
- If the provider is null
.IllegalStateException
- If the consumer is already registered.@Deprecated Broker.ProviderSession registerProvider(Provider prov, org.osgi.framework.BundleContext context)
Copyright © 2019 OpenDaylight. All rights reserved.