org.codehaus.waffle.controller
Class RubyControllerDefinitionFactory

java.lang.Object
  extended by org.codehaus.waffle.controller.ContextControllerDefinitionFactory
      extended by org.codehaus.waffle.controller.RubyControllerDefinitionFactory
All Implemented Interfaces:
ControllerDefinitionFactory

public class RubyControllerDefinitionFactory
extends ContextControllerDefinitionFactory

A JRuby specific extension to the ContextControllerDefinitionFactory if the controller found is an instance of IRubyObject then that object will be wrapped with a RubyController.

Author:
Michael Ward

Constructor Summary
RubyControllerDefinitionFactory(MethodDefinitionFinder methodDefinitionFinder, ControllerNameResolver controllerNameResolver, MethodNameResolver methodNameResolver, ControllerMonitor controllerMonitor)
           
 
Method Summary
protected  java.lang.Object findController(java.lang.String name, javax.servlet.http.HttpServletRequest request)
          Delegates the lookup of the controller to its super class the result will be wrapped as RubyController if the type is a IRubyObject
protected  MethodDefinition findMethodDefinition(java.lang.Object controller, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class org.codehaus.waffle.controller.ContextControllerDefinitionFactory
getControllerDefinition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RubyControllerDefinitionFactory

public RubyControllerDefinitionFactory(MethodDefinitionFinder methodDefinitionFinder,
                                       ControllerNameResolver controllerNameResolver,
                                       MethodNameResolver methodNameResolver,
                                       ControllerMonitor controllerMonitor)
Method Detail

findController

protected java.lang.Object findController(java.lang.String name,
                                          javax.servlet.http.HttpServletRequest request)
Delegates the lookup of the controller to its super class the result will be wrapped as RubyController if the type is a IRubyObject

Overrides:
findController in class ContextControllerDefinitionFactory
Parameters:
name - the name of the controller being requested
request - the current request
Returns:
the controller requested.

findMethodDefinition

protected MethodDefinition findMethodDefinition(java.lang.Object controller,
                                                javax.servlet.http.HttpServletRequest request,
                                                javax.servlet.http.HttpServletResponse response)
Overrides:
findMethodDefinition in class ContextControllerDefinitionFactory


Copyright © 2008. All Rights Reserved.