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

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

The newest version!
<!--
  ~ The MIT License
  ~
  ~ Copyright (c) 2016 Marcelo "Ataxexe" Guimarães <[email protected]>
  ~
  ~ Permission  is hereby granted, free of charge, to any person obtaining
  ~ a  copy  of  this  software  and  associated  documentation files (the
  ~ "Software"),  to  deal  in the Software without restriction, including
  ~ without  limitation  the  rights to use, copy, modify, merge, publish,
  ~ distribute,  sublicense,  and/or  sell  copies of the Software, and to
  ~ permit  persons to whom the Software is furnished to do so, subject to
  ~ the following conditions:
  ~ The  above  copyright  notice  and  this  permission  notice  shall be
  ~ included  in  all  copies  or  substantial  portions  of the Software.
  ~
  ~ THE  SOFTWARE  IS  PROVIDED  "AS  IS",  WITHOUT  WARRANTY OF ANY KIND,
  ~ EXPRESS  OR  IMPLIED,  INCLUDING  BUT NOT LIMITED TO THE WARRANTIES OF
  ~ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  ~ IN  NO  EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  ~ CLAIM,  DAMAGES  OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  ~ TORT  OR  OTHERWISE,  ARISING  FROM,  OUT OF OR IN CONNECTION WITH THE
  ~ SOFTWARE   OR   THE   USE   OR   OTHER   DEALINGS  IN  THE  SOFTWARE.
  -->

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
           xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
           xmlns:cxf="http://cxf.apache.org/blueprint/core"
           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
                               http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
                               http://cxf.apache.org/blueprint/jaxrs http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
                               http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd">

  <cm:property-placeholder persistent-id="tools.devnull.boteco.rest.api"
                           placeholder-prefix="{{"
                           placeholder-suffix="}}">
    <cm:default-properties>
      <cm:property name="rest.path" value="/boteco/api"/>
    </cm:default-properties>
  </cm:property-placeholder>

  <bean id="service-registry" class="tools.devnull.boteco.OsgiServiceRegistry"/>

  <reference id="message-sender" interface="tools.devnull.boteco.message.MessageSender"/>
  <reference id="event-bus" interface="tools.devnull.boteco.event.EventBus"/>
  <reference id="subscription-manager" interface="tools.devnull.boteco.event.SubscriptionManager"/>
  <reference id="request-manager" interface="tools.devnull.boteco.request.RequestManager"/>

  <bean id="channel-service" class="tools.devnull.boteco.rest.ChannelService">
    <argument ref="message-sender"/>
    <argument ref="service-registry"/>
  </bean>

  <bean id="event-service" class="tools.devnull.boteco.rest.EventService">
    <argument ref="event-bus"/>
  </bean>

  <bean id="subscription-service" class="tools.devnull.boteco.rest.SubscriptionService">
    <argument ref="subscription-manager"/>
  </bean>

  <bean id="confirmation-service" class="tools.devnull.boteco.rest.ConfirmationService">
    <argument ref="request-manager"/>
  </bean>

  <jaxrs:server id="server" address="{{rest.path}}">
    <jaxrs:serviceBeans>
      <ref component-id="channel-service"/>
      <ref component-id="event-service"/>
      <ref component-id="subscription-service"/>
      <ref component-id="confirmation-service"/>
    </jaxrs:serviceBeans>
    <jaxrs:providers>
      <bean class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider"/>
    </jaxrs:providers>
  </jaxrs:server>

  <cxf:bus>
    <cxf:features>
      <cxf:logging/>
    </cxf:features>
  </cxf:bus>

</blueprint>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy