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

META-INF.joala.condition.conditions-context.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2012 CoreMedia AG
  ~
  ~ This file is part of Joala.
  ~
  ~ Joala is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ Joala is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with Joala.  If not, see <http://www.gnu.org/licenses/>.
  -->

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd">

  <description><![CDATA[
    Provides importable default beans for condition factory. Usage:
    <import resource="classpath:META-INF/joala/condition/conditions-context.xml"/>

    Available beans:

    * defaultTimeout <net.joala.base.TimeoutImpl>
    * defaultConditionFactory <net.joala.condition.DefaultConditionFactory>

    where defaultTimout can be configured with condition.timeout.seconds (default: 60).
  ]]></description>

  <context:property-placeholder
          ignore-unresolvable="true"
          location="classpath:/META-INF/joala/condition/conditions-context-default.properties"/>

  <bean id="defaultTimeout" class="net.joala.time.TimeoutImpl" scope="singleton">
    <description><![CDATA[
      Provides a default timeout. It defaults to 30 seconds. The amount of
      seconds to use as default can be overriden by a property named
      condition.timeout.seconds.
    ]]></description>
    <constructor-arg name="amount" value="${condition.timeout.seconds}"/>
    <constructor-arg name="unit" value="SECONDS"/>
  </bean>

  <bean id="defaultConditionFactory" class="net.joala.condition.DefaultConditionFactory" scope="singleton">
    <description><![CDATA[
      Default factory for conditions.
    ]]></description>
    <constructor-arg name="timeout" ref="defaultTimeout"/>
  </bean>
</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy