org.apache.shale.remoting.impl
Class MethodBindingProcessor

java.lang.Object
  extended by org.apache.shale.remoting.impl.FilteringProcessor
      extended by org.apache.shale.remoting.impl.MethodBindingProcessor
All Implemented Interfaces:
Processor

public class MethodBindingProcessor
extends FilteringProcessor

Implementation of Processor which maps a resource identifier to a method binding expression, then delegates the creation of the current response to the execution of that method. The precise details of how a resource identifier gets mapped are encapsulated in the mapResourceId method, which may be specialized as desired in a subclass.


Constructor Summary
MethodBindingProcessor()
           
 
Method Summary
protected  javax.faces.el.MethodBinding mapResourceId(javax.faces.context.FacesContext context, String resourceId)
          Map the specified resource identifier into a corresponding MethodBinding which identifies the method which will be called to produce this response.
 void process(javax.faces.context.FacesContext context, String resourceId)
          Convert the specified resource identifier into a method binding expression, and delegate creation of the response to a call to the identified method.
 void setExcludes(String excludes)
          Force our default excludes list to be included.
 
Methods inherited from class org.apache.shale.remoting.impl.FilteringProcessor
accept, getExcludes, getIncludes, setIncludes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodBindingProcessor

public MethodBindingProcessor()
Method Detail

setExcludes

public void setExcludes(String excludes)

Force our default excludes list to be included.

Overrides:
setExcludes in class FilteringProcessor
Parameters:
excludes - Application specified excludes list

process

public void process(javax.faces.context.FacesContext context,
                    String resourceId)
             throws IOException

Convert the specified resource identifier into a method binding expression, and delegate creation of the response to a call to the identified method. Call FacesContext.responseComplete() to tell JavaServer Faces that the entire response has already been created.

Parameters:
context - FacesContext for the current request
resourceId - Resource identifier used to select the appropriate response (this will generally be a context relative path starting with "/")
Throws:
IllegalArgumentException - if the view identifier is not well formed (starting with a '/' character)
IOException - if an input/output error occurs
NullPointerException - if viewId is null

mapResourceId

protected javax.faces.el.MethodBinding mapResourceId(javax.faces.context.FacesContext context,
                                                     String resourceId)

Map the specified resource identifier into a corresponding MethodBinding which identifies the method which will be called to produce this response.

The default algorithm performs this conversion as follows:

Parameters:
context - FacesContext for the current request
resourceId - Resource identifier to be mapped


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.