+public abstract class AbstractBindingAwareProvider extends AbstractBrokerAwareActivator implements BindingAwareProvider {
+
+ @Override
+ protected final void onBrokerAvailable(BindingAwareBroker broker, BundleContext context) {
+ ProviderContext ctx = broker.registerProvider(this, context);
+ registerRpcImplementations(ctx);
+ registerFunctionality(ctx);
+ }
+
+ private void registerFunctionality(ProviderContext ctx) {
+ Collection<? extends ProviderFunctionality> functionality = this.getFunctionality();
+ if (functionality == null || functionality.isEmpty()) {
+ return;
+ }
+ for (ProviderFunctionality providerFunctionality : functionality) {
+ ctx.registerFunctionality(providerFunctionality);
+ }
+
+ }
+
+ private void registerRpcImplementations(ProviderContext ctx) {
+ Collection<? extends RpcService> rpcs = this.getImplementations();
+ if (rpcs == null || rpcs.isEmpty()) {
+ return;
+ }
+ for (RpcService rpcService : rpcs) {
+ // ctx.addRpcImplementation(type, implementation);
+ }
+
+ }