org.apache.cocoon.controller
Interface Controller

All Known Implementing Classes:
SpringRESTController

public interface Controller

The invocation of a controller is separated into two phases: The setup phase setup(String, Map, Map) and the execution phase Controller#execute(OutputStream). After the setup phase a controller must already provide all meta data that are necessary (status codes, mime-types). The execution phase only sends the result as {@link OutputStream}.


Method Summary
 void execute(OutputStream outputStream)
           
 CacheKey getCacheKey()
          This method returns the cache key that might be available after the setup phase.
 void setup(String beanName, Map<String,Object> inputParameters, Map<String,? extends Object> configuration)
           
 

Method Detail

execute

void execute(OutputStream outputStream)
Parameters:
outputStream -

setup

void setup(String beanName,
           Map<String,Object> inputParameters,
           Map<String,? extends Object> configuration)
Parameters:
beanName -
inputParameters -
configuration -

getCacheKey

CacheKey getCacheKey()
This method returns the cache key that might be available after the setup phase.

Returns:
A CacheKey for the controller or null if no cache key can be calculated.


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.