<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC
    "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans-2.0.dtd" >
<beans>

  <bean
    id="adminClientProperties"
    name="adminClientProperties"
    class="com.eactive.eai.rms.client.util.AdminClinetPropertiesFactoryBeanUtil">
    <property
      name="rmsProperties"
      ref="rmsProperties"></property>
  </bean>

  <bean
    id="rmsProperties"
    class="com.eactive.eai.rms.client.context.RmsPropertiesImpl"
    init-method="init">
    <property
      name="rmsPropertiesDao"
      ref="rmsPropertiesDAO"></property>
  </bean>


  <bean
    id="socketClient"
    class="com.eactive.eai.rms.client.SocketClientUdpImpl">
    <property
      name="rmsProperties"
      ref="rmsProperties" />
    <property
      name="handler"
      ref="sessionHandler"></property>
    <property
      name="protocolCodecFactory">
      <bean
        class="org.apache.mina.filter.codec.serialization.ObjectSerializationCodecFactory" />
    </property>
    <property
      name="threadModel">
      <bean
        class="org.apache.mina.integration.spring.ExecutorThreadModelFactoryBean">
        <property
          name="serviceName"
          value="RMS_CLIENT" />
        <property
          name="executor">
          <bean
            class="org.apache.mina.integration.spring.ThreadPoolExecutorFactoryBean">
            <property
              name="corePoolSize"
              value="6" />
            <property
              name="maxPoolSize"
              value="15" />
            <property
              name="keepAliveSeconds"
              value="30" />
          </bean>
        </property>
      </bean>
    </property>
  </bean>

  <bean
    id="sessionHandler"
    class="com.eactive.eai.rms.client.UdpClientSessionHandler">
    <constructor-arg>
      <list>
      <!-- 
        <bean
          class="com.eactive.eai.rms.client.handler.RefreshCommandHandler">
        </bean>
        <bean
          class="com.eactive.eai.rms.client.handler.LogConfigurationCommandHandler">
        </bean>
       -->
      </list>
    </constructor-arg>
  </bean>

  <bean
    id="abstractVo"
    abstract="true">
    <property
      name="instanceName"
      value="${inst.Name}"></property>
    <property
      name="hostName"
      value="${LOCAL_HOST_NAME}"></property>
  </bean>

  <bean
    id="adaptersVO"
    class="com.eactive.eai.rms.onl.vo.AdaptersVO"
    parent="abstractVo"
    scope="prototype">
    <property
      name="category"
      value="com.eactive.eai.rms.onl.vo.AdaptersVO">
    </property>
  </bean>
  
  <bean 
  	id="adaptersStatusVO" 
  	class="com.eactive.eai.rms.onl.vo.AdaptersStatusVO" 
  	parent="abstractVo" 
  	scope="singleton">
	<property 
		name="category" 
		value="com.eactive.eai.rms.onl.vo.AdaptersStatusVO">
	</property>
  </bean>

  <bean
    id="eaiEngineStatusVo"
    parent="abstractVo"
    scope="singleton"
    class="com.eactive.eai.rms.onl.vo.EAIEngineStatusVo">
    <property
      name="category"
      value="com.eactive.eai.rms.onl.vo.EAIEngineStatusVo">
    </property>
  </bean>

  <bean
    id="transactionTrackingVo"
    parent="abstractVo"
    class="com.eactive.eai.rms.onl.vo.TransactionTrackingVo"
    scope="prototype">
    <property
      name="category"
      value="com.eactive.eai.rms.onl.vo.TransactionTrackingVo">
    </property>
  </bean>
  
  <bean
    id="transactionSendVo"
    parent="abstractVo"
    class="com.eactive.eai.rms.onl.vo.TransactionSendVo"
    scope="prototype">
    <property
        name="category"
        value="com.eactive.eai.rms.onl.vo.TransactionSendVo">
    </property>
  </bean>

  <bean
    id="smsVo"
    parent="abstractVo"
    class="com.eactive.eai.rms.onl.vo.SmsVO"
    scope="prototype">
    <property
      name="category"
      value="com.eactive.eai.rms.onl.vo.SmsVO" />
  </bean>
  
  <bean
    id="jmsMonitorVo"
    parent="abstractVo"
    class="com.eactive.eai.rms.onl.vo.JmsMonitorVo"
    scope="prototype">
    <property
      name="category"
      value="com.eactive.eai.rms.onl.vo.JmsMonitorVo" />
  </bean>

  <bean
    id="hostStatusVo"
    parent="abstractVo"
    class="com.eactive.eai.rms.onl.vo.HostStatusVo"
    scope="singleton">
    <property
      name="category"
      value="com.eactive.eai.rms.onl.vo.HostStatusVo">
    </property>
  </bean>

  <bean
    id="itsmVo"
    parent="abstractVo"
    class="com.eactive.eai.rms.onl.vo.ItsmVo"
    scope="prototype">
    <property
      name="category"
      value="com.eactive.eai.rms.onl.vo.ItsmVo">
    </property>
  </bean>


  <bean
    id="adaptersTriger"
    parent="triggerAbstract">
    <property
      name="repeatInterval"
      value="5000"></property>
    <property
      name="jobDetail">
      <bean
        parent="jobDetailAbstract">
        <property
          name="targetMethod"
          value="run"></property>
        <property
          name="targetObject">
          <bean
            id="adaptersAgent"
            class="com.eactive.eai.rms.client.agent.AdaptersAgent">
            <property
              name="socketClient"
              ref="socketClient"></property>
            <property
              name="agentAdapterDao"
              ref="agentAdapterDAO"></property>
          </bean>
        </property>
      </bean>
    </property>
  </bean>
  
  <bean 
  	id="adaptersStatusTriger" 
  	parent="triggerAbstract">
	<property 
		name="repeatInterval" 
		value="5000"></property>
	<property name="jobDetail">
		<bean parent="jobDetailAbstract">
			<property name="targetMethod" value="run"></property>
			<property name="targetObject">
				<bean id="adaptersStatusAgent" class="com.eactive.eai.rms.client.agent.AdaptersStatusAgent">
					<property name="socketClient" ref="socketClient"></property>
				</bean>
			</property>
		</bean>
	</property>
  </bean>

  <bean
    id="eaiEngineSingleStatusService"
    class="com.eactive.eai.rms.client.service.EaiEngineStatusService">
    <property
      name="adminClientProperties"
      ref="adminClientProperties"></property>
    <property
      name="properties"
      ref="rmsProperties"></property>
  </bean>

  <bean
    id="eaiEngineStatusTriger"
    parent="triggerAbstract">
    <property
      name="repeatInterval"
      value="5000"></property>
    <property
      name="jobDetail">
      <bean
        parent="jobDetailAbstract">
        <property
          name="targetMethod"
          value="run"></property>
        <property
          name="targetObject">
          <bean
            id="eaiEngineStatusAgent"
            class="com.eactive.eai.rms.client.agent.EaiEngineStatusAgent">
            <property
              name="socketClient"
              ref="socketClient"></property>
            <property
              name="eaiEngineSingleStatusService"
              ref="eaiEngineSingleStatusService">
            </property>
            <property
              name="hostStatusService"
              ref="hostStatusService">
            </property>
            <property
              name="rmsProperties"
              ref="rmsProperties"></property>
          </bean>
        </property>
      </bean>
    </property>
  </bean>

  <bean
    id="jmsFileStoreJobTrigger"
    parent="triggerAbstract">
    <description>
    </description>
    <property
      name="repeatInterval"
      value="60000"></property>
    <property
      name="jobDetail">
      <bean
        parent="jobDetailAbstract">
        <description>Job Detail</description>
        <property
          name="targetObject">
          <bean
            id="jmsQueueStatusAgent"
            class="com.eactive.eai.rms.client.agent.JmsFileStoreAgent">
            <property
              name="rmsProperties">
              <ref
                bean="rmsProperties" />
            </property>
            <property
              name="hostStatusService"
              ref="hostStatusService">
            </property>
          </bean>
        </property>
      </bean>
    </property>
  </bean>

  <bean
    id="smsAgentTrigger"
    parent="triggerAbstract">
    <property
      name="repeatInterval"
      value="5000"></property>
    <property
      name="jobDetail">
      <bean
        parent="jobDetailAbstract">
        <property
          name="targetObject"
          ref="smsAgent" />
      </bean>
    </property>
  </bean>

  <bean
    id="smsAgent"
    class="com.eactive.eai.rms.client.agent.SmsAgent">
    <property
      name="socketClient"
      ref="socketClient"></property>
    <property
      name="rmsProperties"
      ref="rmsProperties"></property>
  </bean>

  <bean
    id="jmsQueueAgentTrigger"
    parent="triggerAbstract">
    <property
      name="repeatInterval"
      value="5000"></property>
    <property
      name="jobDetail">
      <bean
        parent="jobDetailAbstract">
        <property
          name="targetObject"
          ref="jmsQueueAgent" />
      </bean>
    </property>
  </bean>

  <bean
    id="jmsQueueAgent"
    class="com.eactive.eai.rms.client.agent.JmsQueueAgent">
    <property
      name="socketClient"
      ref="socketClient"></property>
    <property
      name="rmsProperties"
      ref="rmsProperties"></property>
    <property
      name="adminClientProperties"
      ref="adminClientProperties"></property>
  </bean>


  <bean
    id="transactionTrackingAgentTrigger"
    parent="triggerAbstract">
    <property
      name="repeatInterval"
      value="5000"></property>
    <property
      name="jobDetail">
      <bean
        parent="jobDetailAbstract">
        <property
          name="targetObject"
          ref="transactionTrackingAgent"></property>
      </bean>
    </property>
  </bean>
  <bean
    id="transactionTrackingAgent"
    class="com.eactive.eai.rms.client.agent.TransactionTrackingAgent">
    <property
      name="socketClient"
      ref="socketClient"></property>
  </bean>

  <bean
    id="hostStatusAgentTrigger"
    parent="triggerAbstract">
    <property
      name="repeatInterval"
      value="30000"></property>
    <property
      name="jobDetail">
      <bean
        parent="jobDetailAbstract">
        <property
          name="targetObject"
          ref="hostStatusAgent"></property>
      </bean>
    </property>
  </bean>

  <bean
    id="hostStatusAgent"
    class="com.eactive.eai.rms.client.agent.HostStatusAgent">
    <property
      name="socketClient"
      ref="socketClient"></property>
    <property
      name="rmsProperties"
      ref="rmsProperties"></property>
    <property
      name="hostStatusService"
      ref="hostStatusService"></property>
  </bean>

  <bean
    id="hostStatusService"
    class="com.eactive.eai.rms.client.service.HostStatusService">
  </bean>

  <bean
    id="itsmMonitorAgentTrigger"
    parent="triggerAbstract">
    <property
      name="repeatInterval"
      value="5000"></property>
    <property
      name="jobDetail">
      <bean
        parent="jobDetailAbstract">
        <property
          name="targetObject"
          ref="itsmMonitorAgent"></property>
      </bean>
    </property>
  </bean>

  <bean
    id="itsmMonitorAgent"
    class="com.eactive.eai.rms.client.agent.ItsmMonitorAgent">
    <property
      name="socketClient"
      ref="socketClient"></property>
    <property
      name="rmsProperties"
      ref="rmsProperties"></property>
    <property
      name="hostStatusService"
      ref="hostStatusService"></property>
    <property
      name="hostStatusVo"
      ref="hostStatusVo"></property>
  </bean>

  <bean
    id="jobDetailAbstract"
    abstract="true"
    class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
    <property
      name="targetMethod">
      <value>run</value>
    </property>
    <property
      name="concurrent">
      <value>false</value>
    </property>
  </bean>

  <bean
    id="triggerAbstract"
    abstract="true"
    class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean">
    <property
      name="startDelay">
      <value>5000</value>
    </property>
    <property
      name="repeatInterval">
      <value>30000</value>
    </property>
  </bean>

  <!-- bean
    class="com.eactive.eai.rms.onl.common.scheduler.SchedulerBeanFactoryProcessor">
    <property
      name="scheduler"
      ref="scheduler"></property>
  </bean-->
</beans>
