Issue #1322 Move router registry to edex.xml

Amend:
  Add requestRouterRegistry to viz Spring file.

Change-Id: Id2697aaca02662bd1bb9f759070b2cde8f1dd864

Former-commit-id: dd82a472e5 [formerly 13b1683458] [formerly dd82a472e5 [formerly 13b1683458] [formerly a9d01486ed [formerly dc3f0b465628d312f675b16d61c0456bf79edc7d]]]
Former-commit-id: a9d01486ed
Former-commit-id: dd03bf9bd5 [formerly 1bb69653af]
Former-commit-id: f91817813d
This commit is contained in:
Dustin Johnson 2012-11-19 12:41:15 -06:00
parent 05ab674cdd
commit 5b64ddb7ba
6 changed files with 44 additions and 46 deletions

View file

@ -34,6 +34,10 @@
</bean> -->
<bean class="com.raytheon.uf.common.geospatial.LogRedirector" factory-method="getInstance"/>
<bean id="requestRouterRegistry"
class="com.raytheon.uf.common.serialization.comm.RequestRouter"
factory-method="getRouterRegistry" />
<bean id="requestServiceRouter" class="com.raytheon.uf.viz.core.requests.ServerRequestRouter">
<!-- This bean will cause all RequestRouter.route(request) calls to be serialized over to EDEX -->

View file

@ -163,7 +163,6 @@
<include>management-common.xml</include>
<include>database-common.xml</include>
<include>auth-common.xml</include>
<include>router-common.xml</include>
<include>event-ingest.xml</include>
<!-- ncep excludes until tested -->
<exclude>ncgrib-common.xml</exclude>
@ -290,7 +289,6 @@
<include>management-common.xml</include>
<include>database-common.xml</include>
<include>auth-common.xml</include>
<include>router-common.xml</include>
<include>stats-common.xml</include>
<include>event-ingest.xml</include>
</mode>

View file

@ -350,4 +350,36 @@
</list>
</property>
</bean>
<!-- Holds the registry of request routers by server key -->
<bean id="handlerRegistry" class="com.raytheon.uf.edex.auth.HandlerRegistry"
factory-method="getInstance" />
<bean id="requestRouterRegistry"
class="com.raytheon.uf.common.serialization.comm.RequestRouter"
factory-method="getRouterRegistry" />
<!-- Server Request routers -->
<bean id="serverPrivilegedRequestHandler"
class="com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler">
<constructor-arg ref="handlerRegistry" />
</bean>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg
value="com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler.ServerPrivilegedRequest" />
<constructor-arg ref="serverPrivilegedRequestHandler" />
</bean>
<bean id="requestServiceRouter" class="com.raytheon.uf.edex.auth.ServerRequestRouter">
<!-- This bean will cause all RequestRouter.route(request) calls
to be processed internally to EDEX -->
</bean>
<bean id="registerRequestServiceRouter" factory-bean="requestRouterRegistry"
factory-method="register">
<constructor-arg value="request.server" />
<constructor-arg ref="requestServiceRouter" />
</bean>
</beans>

View file

@ -1,5 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
res/
.

View file

@ -1,15 +0,0 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.5.xsd">
<!-- Holds the registry of request routers by server key -->
<bean id="requestRouterRegistry"
class="com.raytheon.uf.common.serialization.comm.RequestRouter"
factory-method="getRouterRegistry" />
</beans>

View file

@ -1,35 +1,15 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="handlerRegistry" class="com.raytheon.uf.edex.auth.HandlerRegistry" factory-method="getInstance"/>
<bean id="serializeServer" class="com.raytheon.uf.edex.auth.RemoteRequestServer" factory-method="getInstance">
<property name="registry" ref="handlerRegistry"/>
</bean>
<bean id="routeWrapper" class="com.raytheon.uf.edex.auth.RemoteRequestRouteWrapper">
<property name="server" ref="serializeServer"/>
</bean>
<bean id="serverPrivilegedRequestHandler" class="com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler">
<constructor-arg ref="handlerRegistry" />
<bean id="serializeServer" class="com.raytheon.uf.edex.auth.RemoteRequestServer"
factory-method="getInstance">
<property name="registry" ref="handlerRegistry" />
</bean>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler.ServerPrivilegedRequest" />
<constructor-arg ref="serverPrivilegedRequestHandler"/>
</bean>
<bean id="requestServiceRouter" class="com.raytheon.uf.edex.auth.ServerRequestRouter">
<!-- This bean will cause all RequestRouter.route(request) calls to be processed internally to EDEX -->
<bean id="routeWrapper" class="com.raytheon.uf.edex.auth.RemoteRequestRouteWrapper">
<property name="server" ref="serializeServer" />
</bean>
<bean id="registerRequestServiceRouter" factory-bean="requestRouterRegistry"
factory-method="register">
<constructor-arg value="request.server" />
<constructor-arg ref="requestServiceRouter" />
</bean>
</beans>