@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.milyn.delivery.dom.DOMElementVisitor, org.milyn.delivery.sax.SAXVisitBefore, org.milyn.delivery.sax.SAXVisitAfter, org.milyn.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.milyn.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.milyn.container.ExecutionContext executionContext) |
void |
visitAfter(org.milyn.delivery.sax.SAXElement element,
org.milyn.container.ExecutionContext executionContext) |
void |
visitBefore(Element element,
org.milyn.container.ExecutionContext executionContext) |
void |
visitBefore(org.milyn.delivery.sax.SAXElement element,
org.milyn.container.ExecutionContext executionContext) |
@Initialize
public void initialize()
throws org.milyn.cdr.SmooksConfigurationException
org.milyn.cdr.SmooksConfigurationExceptionpublic boolean consumes(Object object)
consumes in interface org.milyn.delivery.ordering.Consumerpublic void visitBefore(Element element, org.milyn.container.ExecutionContext executionContext) throws org.milyn.SmooksException
visitBefore in interface org.milyn.delivery.dom.DOMVisitBeforeorg.milyn.SmooksExceptionpublic void visitAfter(Element element, org.milyn.container.ExecutionContext executionContext) throws org.milyn.SmooksException
visitAfter in interface org.milyn.delivery.dom.DOMVisitAfterorg.milyn.SmooksExceptionpublic void visitBefore(org.milyn.delivery.sax.SAXElement element,
org.milyn.container.ExecutionContext executionContext)
throws org.milyn.SmooksException,
IOException
visitBefore in interface org.milyn.delivery.sax.SAXVisitBeforeorg.milyn.SmooksExceptionIOExceptionpublic void visitAfter(org.milyn.delivery.sax.SAXElement element,
org.milyn.container.ExecutionContext executionContext)
throws org.milyn.SmooksException,
IOException
visitAfter in interface org.milyn.delivery.sax.SAXVisitAfterorg.milyn.SmooksExceptionIOExceptionpublic String getResourceName()
Copyright © 2016. All rights reserved.