no.tornado.brap.spring
Class SpringProxyServlet

java.lang.Object
  extended by no.tornado.brap.servlet.ProxyServlet
      extended by no.tornado.brap.spring.SpringProxyServlet
All Implemented Interfaces:
javax.servlet.Servlet

public class SpringProxyServlet
extends ProxyServlet

This SpringProxyServlet is configured from web.xml for each service you wish to expose as a remoting service. You must refer to a bean in your applicationContext that provides the complete ServiceWrapper.

web.xml example of exposing a remoting service:

  <servlet>
      <servlet-name>hello</servlet-name>
      <servlet-class>no.tornado.brap.servlet.ProxyServlet</servlet-class>
      <init-param>
          <param-name>beanName</param-name>
          <param-value>helloRemoteService</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
      <servlet-name>hello</servlet-name>
      <url-pattern>/remoting/hello</url-pattern>
  </servlet-mapping>
 

applicationContext.xml example:

   <bean id="helloRemoteService" class="no.tornado.brap.servlet.ServiceWrapper">
       <property name="service" ref="helloService"/>
       <property name="authenticationProvider" ref="authenticationProvider"/>
       <property name="authorizationProvider" ref="authorizationProvider"/>
   </bean>

   <bean id="authenticationProvider" class="no.tornado.brap.auth.SingleUsernamePasswordAuthenticator">
       <property name="username" value="john"/>
       <property name="password" value="secret"/>
   </bean>

  <bean id="authorizationProvider" class="no.tornado.brap.auth.AllowAllAuthorizer"/>

   <bean id="helloService" class="no.tornado.brap.test.service.HelloService"/>
 


Field Summary
protected  org.springframework.context.ApplicationContext applicationContext
           
 
Fields inherited from class no.tornado.brap.servlet.ProxyServlet
INIT_PARAM_AUTHENTICATION_PROVIDER, INIT_PARAM_AUTHORIZATION_PROVIDER, INIT_PARAM_MODIFICATION_MANAGER, INIT_PARAM_SERVICE, serviceWrapper, servletConfig
 
Constructor Summary
SpringProxyServlet()
           
 
Method Summary
 void createServiceWrapper()
           
 
Methods inherited from class no.tornado.brap.servlet.ProxyServlet
destroy, getAuthenticationProvider, getAuthorizationProvider, getModificationManager, getService, getServletConfig, getServletInfo, getStreamBufferSize, init, postMethodInvocation, preMethodInvocation, service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applicationContext

protected org.springframework.context.ApplicationContext applicationContext
Constructor Detail

SpringProxyServlet

public SpringProxyServlet()
Method Detail

createServiceWrapper

public void createServiceWrapper()
Overrides:
createServiceWrapper in class ProxyServlet


Copyright © 2009-2011 Syse Data AS. All Rights Reserved.