/** * {@inheritDoc} * * @see org.apache.cocoon.pipeline.Pipeline#execute() */ public void execute() throws Exception { if (!this.setupDone) { throw new ProcessingException(new IllegalStateException( "The pipeline wasn't setup correctly. Call #setup() first.")); } this.invokeStarter(); }
/** * {@inheritDoc} * * @see org.apache.cocoon.pipeline.AbstractPipeline#setConfiguration(java.util.Map) */ @Override public void setConfiguration(Map<String, ? extends Object> parameters) { this.expires = (String) parameters.get("expires"); this.expiresCacheKey = (Serializable) parameters.get("expires-cache-key"); this.jmxGroupName = (String) parameters.get("jmx-group-name"); super.setConfiguration(parameters); }
/** * {@inheritDoc} * * @see org.apache.cocoon.pipeline.Pipeline#setup(java.io.OutputStream, * java.util.Map) */ public void setup(OutputStream outputStream) { this.setup(outputStream, null); }
@Override public String toString() { return StringRepresentation.buildString(this, "components=" + this.getComponents()); }
/** * {@inheritDoc} * * @see org.apache.cocoon.pipeline.Pipeline#getContentType() */ public String getContentType() { return this.getFinisher().getContentType(); }
/** * {@inheritDoc} * * @see org.apache.cocoon.pipeline.Pipeline#setup(java.io.OutputStream, * java.util.Map) */ public void setup(OutputStream outputStream, Map<String, Object> parameters) { if (outputStream == null) { throw new SetupException("An output stream must be passed."); } this.setupComponents(outputStream, parameters); this.setupDone = true; }
this.linkComponents(currentComponent, nextComponent);
protected void invokeStarter() { if (this.logger.isDebugEnabled()) { this.logger.debug("Invoking first component of " + this); } try { Starter starter = (Starter) this.components.getFirst(); starter.execute(); } finally { for (PipelineComponent pipelineComponent : this.getComponents()) { pipelineComponent.finish(); } } }
@Override public void setup(OutputStream outputStream, Map<String, Object> parameters) { // create a caching output stream to intercept the result this.cachingOutputStream = new CachingOutputStream(outputStream); super.setup(this.cachingOutputStream, parameters); this.cacheKey = this.constructCacheKey(); }