@VisitAfterIf(condition="!parameters.containsKey(\'visitBefore\') || parameters.visitBefore.value != \'true\'") @VisitBeforeIf(condition="!parameters.containsKey(\'visitAfter\') || parameters.visitAfter.value != \'true\'") public class OutputStreamRouter extends Object implements org.smooks.api.resource.visitor.sax.ng.BeforeVisitor, org.smooks.api.resource.visitor.sax.ng.AfterVisitor, org.smooks.api.delivery.ordering.Consumer
BeanContext beans) an OutputStream.
An OutputStreamRouter is used in combination with a concreate implementation of
AbstractOutputStreamResource, for example a FileOutputStreamResource.
Example configuration:
<resource-config selector="orderItem">
<resource>org.smooks.routing.io.OutputStreamRouter</resource>
<param name="resourceName">refToResource</param>
<param name="beanId">orderItem</param>
</resource-config>
Description of configuration properties:
beanId is key used search the execution context for the content to be written the OutputStream
resourceName is a reference to a previously configured AbstractOutputStreamResource
encoding is the encoding used when writing a characters to file
| Constructor and Description |
|---|
OutputStreamRouter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
consumes(Object object) |
String |
getResourceName() |
void |
initialize() |
void |
visitAfter(Element element,
org.smooks.api.ExecutionContext executionContext) |
void |
visitBefore(Element element,
org.smooks.api.ExecutionContext executionContext) |
@PostConstruct public void initialize() throws org.smooks.api.SmooksConfigException
org.smooks.api.SmooksConfigExceptionpublic boolean consumes(Object object)
consumes in interface org.smooks.api.delivery.ordering.Consumerpublic void visitBefore(Element element, org.smooks.api.ExecutionContext executionContext) throws org.smooks.api.SmooksException
visitBefore in interface org.smooks.api.resource.visitor.sax.ng.BeforeVisitororg.smooks.api.SmooksExceptionpublic void visitAfter(Element element, org.smooks.api.ExecutionContext executionContext) throws org.smooks.api.SmooksException
visitAfter in interface org.smooks.api.resource.visitor.sax.ng.AfterVisitororg.smooks.api.SmooksExceptionpublic String getResourceName()
Copyright © 2022. All rights reserved.