org.springframework.batch.item.xml.stax
Class DefaultTransactionalEventReader

java.lang.Object
  extended by org.springframework.batch.item.xml.stax.DefaultTransactionalEventReader
All Implemented Interfaces:
Iterator, javax.xml.stream.XMLEventReader, TransactionalEventReader, InitializingBean

Deprecated. no longer used, to be removed in 2.0

public class DefaultTransactionalEventReader
extends Object
implements TransactionalEventReader, InitializingBean

Class used to wrap XMLEventReader. Events from wrapped reader are stored in EventSequence to support transactions.

Author:
Tomas Slanina, Robert Kasanicky

Field Summary
protected  javax.xml.stream.XMLEventReader wrappedEventReader
           
 
Constructor Summary
DefaultTransactionalEventReader(javax.xml.stream.XMLEventReader wrappedReader)
          Deprecated. Creates instance of this class and wraps XMLEventReader.
 
Method Summary
 void afterPropertiesSet()
          Deprecated.  
 void close()
           
 String getElementText()
           
 Object getProperty(String name)
           
 boolean hasNext()
          Deprecated. Check if there are more events.
 Object next()
           
 javax.xml.stream.events.XMLEvent nextEvent()
          Deprecated. Get the next XMLEvent
 javax.xml.stream.events.XMLEvent nextTag()
           
 void onCommit()
          Deprecated. Callback on transacion commit.
 void onRollback()
          Deprecated. Callback on transaction rollback.
 javax.xml.stream.events.XMLEvent peek()
          Deprecated. Check the next XMLEvent without reading it from the stream.
 void remove()
          Deprecated. In this implementation throws UnsupportedOperationException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.stream.XMLEventReader
close, getElementText, getProperty, nextTag
 
Methods inherited from interface java.util.Iterator
next
 

Field Detail

wrappedEventReader

protected javax.xml.stream.XMLEventReader wrappedEventReader
Constructor Detail

DefaultTransactionalEventReader

public DefaultTransactionalEventReader(javax.xml.stream.XMLEventReader wrappedReader)
Deprecated. 
Creates instance of this class and wraps XMLEventReader.

Parameters:
wrappedReader - event reader to be wrapped.
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Deprecated. 
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

onRollback

public void onRollback()
Deprecated. 
Callback on transaction rollback.

Specified by:
onRollback in interface TransactionalEventReader

onCommit

public void onCommit()
Deprecated. 
Callback on transacion commit.

Specified by:
onCommit in interface TransactionalEventReader

hasNext

public boolean hasNext()
Deprecated. 
Check if there are more events. Returns true if there are more events and false otherwise.

Specified by:
hasNext in interface Iterator
Specified by:
hasNext in interface javax.xml.stream.XMLEventReader
Returns:
true if the event reader has more events, false otherwise

nextEvent

public javax.xml.stream.events.XMLEvent nextEvent()
                                           throws javax.xml.stream.XMLStreamException
Deprecated. 
Get the next XMLEvent

Specified by:
nextEvent in interface javax.xml.stream.XMLEventReader
Throws:
javax.xml.stream.XMLStreamException - if there is an error with the underlying XML.
NoSuchElementException - iteration has no more elements.
See Also:
XMLEvent

peek

public javax.xml.stream.events.XMLEvent peek()
                                      throws javax.xml.stream.XMLStreamException
Deprecated. 
Check the next XMLEvent without reading it from the stream. Returns null if the stream is at EOF or has no more XMLEvents. A call to peek() will be equal to the next return of next().

Specified by:
peek in interface javax.xml.stream.XMLEventReader
Throws:
javax.xml.stream.XMLStreamException
See Also:
XMLEvent

remove

public void remove()
Deprecated. 
In this implementation throws UnsupportedOperationException.

Specified by:
remove in interface Iterator

close

public void close()
           throws javax.xml.stream.XMLStreamException
Specified by:
close in interface javax.xml.stream.XMLEventReader
Throws:
javax.xml.stream.XMLStreamException

getElementText

public String getElementText()
                      throws javax.xml.stream.XMLStreamException
Specified by:
getElementText in interface javax.xml.stream.XMLEventReader
Throws:
javax.xml.stream.XMLStreamException

getProperty

public Object getProperty(String name)
                   throws IllegalArgumentException
Specified by:
getProperty in interface javax.xml.stream.XMLEventReader
Throws:
IllegalArgumentException

nextTag

public javax.xml.stream.events.XMLEvent nextTag()
                                         throws javax.xml.stream.XMLStreamException
Specified by:
nextTag in interface javax.xml.stream.XMLEventReader
Throws:
javax.xml.stream.XMLStreamException

next

public Object next()
Specified by:
next in interface Iterator


Copyright © 2009 SpringSource. All Rights Reserved.