groovy.servlet
Class ServletBinding

java.lang.Object
  extended by groovy.lang.GroovyObjectSupport
      extended by groovy.lang.Binding
          extended by groovy.servlet.ServletBinding
All Implemented Interfaces:
GroovyObject

public class ServletBinding
extends Binding

Servlet-specific binding extension to lazy load the writer or the output stream from the response.

Eager variables bound

Lazy variables bound

Author:
Guillaume Laforge, Christian Stein

Constructor Summary
ServletBinding(HttpServletRequest request, HttpServletResponse response, ServletContext context)
          Initializes a servlet binding.
 
Method Summary
 Object getVariable(String name)
           
 Map getVariables()
           
 void setVariable(String name, Object value)
          Sets the value of the given variable
 
Methods inherited from class groovy.lang.Binding
getProperty, setProperty
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, invokeMethod, setMetaClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletBinding

public ServletBinding(HttpServletRequest request,
                      HttpServletResponse response,
                      ServletContext context)
Initializes a servlet binding.

Parameters:
request - the HttpServletRequest object
response - the HttpServletRequest object
context - the ServletContext object
Method Detail

setVariable

public void setVariable(String name,
                        Object value)
Description copied from class: Binding
Sets the value of the given variable

Overrides:
setVariable in class Binding
Parameters:
name - the name of the variable to set
value - the new value for the given variable

getVariables

public Map getVariables()
Overrides:
getVariables in class Binding

getVariable

public Object getVariable(String name)
Overrides:
getVariable in class Binding
Parameters:
name - the name of the variable to lookup
Returns:
a writer, an output stream, a markup builder or another requested object

Copyright © 2003-2009 The Codehaus. All rights reserved.