1 package org.apache.turbine.pipeline; 2 3 56 57 import java.io.IOException ; 58 import java.io.Writer ; 59 60 import org.apache.turbine.RunData; 61 import org.apache.turbine.TurbineException; 62 import org.apache.turbine.ValveContext; 63 import org.apache.turbine.pipeline.AbstractValve; 64 65 71 class SimpleValve 72 extends AbstractValve 73 { 74 private String value; 75 76 private Writer writer; 77 78 81 public void setValue(String value) 82 { 83 this.value = value; 84 } 85 86 protected void setWriter(Writer writer) 87 { 88 this.writer = writer; 89 } 90 91 94 public void invoke(RunData data, ValveContext context) 95 throws IOException , TurbineException 96 { 97 writer.write(value); 99 100 context.invokeNext(data); 102 } 103 } 104 | Popular Tags |