org.gwtwidgets.server.spring
Class RequestInjection

java.lang.Object
  extended by org.gwtwidgets.server.spring.RequestInjection
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class RequestInjection
extends java.lang.Object
implements org.aopalliance.intercept.MethodInterceptor

Method interceptor that injects the current HttpServletRequest and the current HttpServletResponse via reflection to a service. You must specify the setter names via setRequestSetterName(String) and setResponseSetterName(String) otherwise they will fail silently. These setters can and must have only a single argument namely ServletRequest and ServletResponse respectively.

Author:
George Georgovassilis, g.georgovassilis[at]gmail.com

Field Summary
protected  java.lang.String requestSetterName
           
protected  java.lang.String responseSetterName
           
 
Constructor Summary
RequestInjection()
           
 
Method Summary
 java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
           
 void setRequestSetterName(java.lang.String setterName)
          Specify the name of the setter method that can be invoked to set the current request and response on the service.
 void setResponseSetterName(java.lang.String setterName)
          Specify the name of the setter method that can be invoked to set the current response on the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requestSetterName

protected java.lang.String requestSetterName

responseSetterName

protected java.lang.String responseSetterName
Constructor Detail

RequestInjection

public RequestInjection()
Method Detail

invoke

public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
                        throws java.lang.Throwable
Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
java.lang.Throwable

setRequestSetterName

public void setRequestSetterName(java.lang.String setterName)
Specify the name of the setter method that can be invoked to set the current request and response on the service. If the method does not exist on the service, it is silently discarded.

Parameters:
setterName -

setResponseSetterName

public void setResponseSetterName(java.lang.String setterName)
Specify the name of the setter method that can be invoked to set the current response on the service. If the method does not exist on the service, it is silently discarded.

Parameters:
setterName -


Copyright © 2011. All Rights Reserved.