groovy.servlet
Class ServletBinding

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

public class ServletBinding
extends Binding

Servlet-specific binding extesion to lazy load the writer or the output stream from the response. This binding also provide a markup builder named "html".

Author:
Guillaume Laforge

Field Summary
protected  Binding binding
           
private  MarkupBuilder html
           
private  javax.servlet.ServletResponse response
           
 
Fields inherited from class groovy.lang.Binding
 
Fields inherited from class groovy.lang.GroovyObjectSupport
 
Constructor Summary
ServletBinding(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletResponse response, javax.servlet.ServletContext sc)
           
 
Method Summary
 java.lang.Object getVariable(java.lang.String name)
           
 java.util.Map getVariables()
           
 void setVariable(java.lang.String name, java.lang.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
 

Field Detail

binding

protected Binding binding

response

private javax.servlet.ServletResponse response

html

private MarkupBuilder html
Constructor Detail

ServletBinding

public ServletBinding(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.ServletResponse response,
                      javax.servlet.ServletContext sc)
Method Detail

setVariable

public void setVariable(java.lang.String name,
                        java.lang.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 java.util.Map getVariables()
Overrides:
getVariables in class Binding

getVariable

public java.lang.Object getVariable(java.lang.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-2005 The Codehaus. All Rights Reserved.