biz.c24.io.api.mule
Class StreamingParserUMO

java.lang.Object
  extended by biz.c24.io.api.mule.StreamingParserUMO

public class StreamingParserUMO
extends Object

A Mule UMO for quickly parsing an InputStream and sending notifications to a DownstreamComponent when a particular class of object is parsed. Alpha Release. Use at your own risk.


Constructor Summary
StreamingParserUMO()
          Creates a new instance which will require further initialization.
StreamingParserUMO(Class rootClass, Class streamClass, DownstreamComponent component)
          Creates a new instance which will attempt to parse against the specified root element class and detect instances of streamClass and forward them to component.
 
Method Summary
 DownstreamComponent getComponent()
          Returns the component to which the streamClass objects will be forwarded
 Class getRootClass()
          Returns the class of the generated root Element.
 Class getStreamClass()
          Returns the class of the generated Element, ComplexDataType, or ComplexDataObject to detect in the stream.
 void parse(InputStream is)
          Parses from the specfied input stream.
 void setComponent(DownstreamComponent component)
          Sets the component to which the streamClass objects will be forwarded
 void setRootClass(Class rootClass)
          Sets the class of the generated root Element.
 void setStreamClass(Class streamClass)
          Sets the class of the generated Element, ComplexDataType, or ComplexDataObject to detect in the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamingParserUMO

public StreamingParserUMO()
Creates a new instance which will require further initialization.


StreamingParserUMO

public StreamingParserUMO(Class rootClass,
                          Class streamClass,
                          DownstreamComponent component)
Creates a new instance which will attempt to parse against the specified root element class and detect instances of streamClass and forward them to component.

Parameters:
rootClass - The class of the generated root Element.
streamClass - The class of the generated Element, ComplexDataType, or ComplexDataObject to detect in the stream.
component - The component to which the streamClass objects will be forwarded.
Throws:
NullPointerException - If any argument is null.
IllegalArgumentException - If either of the class arguments are not of the correct type or are taken directly from the C24 Integration Objects API.
Method Detail

parse

public void parse(InputStream is)
Parses from the specfied input stream.
Parsed objects will be validated and any validation failure will be thrown as an IllegalArgumentException

Parameters:
is - The input stream to parse from.
Throws:
IllegalArgumentException - If validation fails, or if the rootClass or streamClass can not be instantiated for any reason.
NullPointerException - If this class has any null bean properties.

getRootClass

public Class getRootClass()
Returns the class of the generated root Element.

Returns:
The root class.

setRootClass

public void setRootClass(Class rootClass)
Sets the class of the generated root Element.

Parameters:
rootClass - The new value.

getStreamClass

public Class getStreamClass()
Returns the class of the generated Element, ComplexDataType, or ComplexDataObject to detect in the stream.

Returns:
The stream class.

setStreamClass

public void setStreamClass(Class streamClass)
Sets the class of the generated Element, ComplexDataType, or ComplexDataObject to detect in the stream.

Parameters:
streamClass - The new value.

getComponent

public DownstreamComponent getComponent()
Returns the component to which the streamClass objects will be forwarded

Returns:
The component.

setComponent

public void setComponent(DownstreamComponent component)
Sets the component to which the streamClass objects will be forwarded

Parameters:
component - The new value.


C24 Technologies © 2002-2012: All Rights Reserved.