All Downloads are FREE. Search and download functionalities are using the official Maven repository.

OSGI-INF.blueprint.fab-deployer.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (C) FuseSource, Inc.
  http://fusesource.com

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
           default-activation="lazy">

  <reference id="configurationAdmin" interface="org.osgi.service.cm.ConfigurationAdmin" />
  <reference id="featuresService" interface="org.apache.karaf.features.FeaturesService" />

  <bean id="fabResolverFactory" class="org.fusesource.fabric.fab.osgi.internal.FabResolverFactoryImpl">
    <property name="bundleContext" ref="blueprintBundleContext" />
    <property name="configurationAdmin" ref="configurationAdmin" />
    <property name="featuresService" ref="featuresService" />
  </bean>

  <!-- export the FAB resolver factory - this allows e.g. Fabric to learn about FAB resolution as well -->
  <service ref="fabResolverFactory" interface="org.fusesource.fabric.fab.osgi.FabResolverFactory" />

  <bean id="fabUrlHandler" class="org.fusesource.fabric.fab.osgi.FabURLHandler">
    <property name="fabResolverFactory" ref="fabResolverFactory" />
    <property name="serviceProvider" ref="fabResolverFactory" />
  </bean>


  <service ref="fabUrlHandler" interface="org.osgi.service.url.URLStreamHandlerService">
    <service-properties>
      <entry key="url.handler.protocol" value="fab"/>
    </service-properties>
  </service>

  <bean id="fabDeploymentListener" class="org.fusesource.fabric.fab.osgi.FabDeploymentListener"/>



  <!-- Force a reference to the url handler above from the osgi registry to (try to) make sure
the url handler is registered inside the framework.  Else we can run into timing issues
where fileinstall will use the featureDeploymentListener before the url can be actually
used.  In order to not block the bundle, the blueprint.graceperiod=false flag must be
set on the SymbolicName osgi header -->
  <!--
  <reference id="fabUrlHandlerRef" interface="org.osgi.service.url.URLStreamHandlerService" filter="url.handler.protocol=fab" />
  -->

  <service ref="fabDeploymentListener" auto-export="interfaces" depends-on="fabDeploymentListener" ranking="1"/>

  <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
    <command name="fab/tree">
        <action class="org.fusesource.fabric.fab.osgi.commands.fab.TreeCommand"/>
    </command>
    <command name="fab/headers">
        <action class="org.fusesource.fabric.fab.osgi.commands.fab.HeadersCommand"/>
    </command>
    <command name="fab/info">
        <action class="org.fusesource.fabric.fab.osgi.commands.fab.InfoCommand"/>
    </command>
    <command name="fab/start">
        <action class="org.fusesource.fabric.fab.osgi.commands.fab.StartCommand"/>
    </command>
    <command name="fab/stop">
        <action class="org.fusesource.fabric.fab.osgi.commands.fab.StopCommand"/>
    </command>
    <command name="fab/uninstall">
        <action class="org.fusesource.fabric.fab.osgi.commands.fab.UninstallCommand"/>
    </command>

    <!-- FAB-31 - module:* commands are disabled to avoid confusing our users
    <command name="module/show">
        <action class="org.fusesource.fabric.fab.osgi.commands.module.ShowCommand"/>
    </command>
    <command name="module/list">
        <action class="org.fusesource.fabric.fab.osgi.commands.module.ListCommand"/>
    </command>
    <command name="module/search">
        <action class="org.fusesource.fabric.fab.osgi.commands.module.SearchCommand"/>
    </command>
    <command name="module/update">
        <action class="org.fusesource.fabric.fab.osgi.commands.module.UpdateCommand"/>
    </command>
    <command name="module/install">
        <action class="org.fusesource.fabric.fab.osgi.commands.module.InstallCommand"/>
    </command>
    <command name="module/uninstall">
        <action class="org.fusesource.fabric.fab.osgi.commands.module.UninstallCommand"/>
    </command>
    -->
  </command-bundle>

</blueprint>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy