org.springframework.batch.item.xml
Class StaxUtils

java.lang.Object
  extended by org.springframework.batch.item.xml.StaxUtils

public abstract class StaxUtils
extends Object

This class provides a little bit of indirection to avoid ugly conditional object creation. It is unfortunately a bit redundant assuming a Spring 3.0 environment, but is necessary to work with Spring WS 1.5.x.

The returned object determines whether the environment has Spring OXM as included in the Spring 3.x series of relies or whether it has Spring OXM from Spring WS 1.5x and factories a StaxSource instance appropriately.

As the only class state maintained is to cache java reflection metadata, which is thread safe, this class is thread-safe.

Author:
Josh Long
See Also:
StaxSource

Constructor Summary
StaxUtils()
           
 
Method Summary
static Result getResult(XMLEventWriter w)
           
static Source getSource(XMLEventReader r)
           
static XMLEventReader getXmlEventReader(Source s)
           
static XMLEventWriter getXmlEventWriter(Result r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaxUtils

public StaxUtils()
Method Detail

getSource

public static Source getSource(XMLEventReader r)
                        throws Exception
Throws:
Exception

getResult

public static Result getResult(XMLEventWriter w)
                        throws Exception
Throws:
Exception

getXmlEventWriter

public static XMLEventWriter getXmlEventWriter(Result r)
                                        throws Exception
Throws:
Exception

getXmlEventReader

public static XMLEventReader getXmlEventReader(Source s)
                                        throws Exception
Throws:
Exception


Copyright © 2013 SpringSource. All Rights Reserved.