Package com.adaptris.stax.lms
Class StaxGetRootElementService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.stax.lms.StaxGetRootElementService
-
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,MessageEventGenerator,Service,StateManagedComponent
@ComponentProfile(summary="Gets the root element of Xml via STaX and sets it as metadata", tag="service,xml") public class StaxGetRootElementService extends ServiceImpIn the adapter configuration file this class is aliased as stax-get-root-element which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description StaxGetRootElementService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intbufferSize()protected voidcloseService()voiddoService(AdaptrisMessage msg)java.lang.IntegergetBufferSize()XmlInputFactoryBuildergetInputFactoryBuilder()java.lang.StringgetMetadataKey()protected voidinitService()voidprepare()voidsetBufferSize(java.lang.Integer b)Set the internal buffer size.voidsetInputFactoryBuilder(XmlInputFactoryBuilder inputFactoryBuilder)voidsetMetadataKey(java.lang.String metadataKey)StaxGetRootElementServicewithInputFactoryBuilder(XmlInputFactoryBuilder b)-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
-
-
-
-
Method Detail
-
doService
public void doService(AdaptrisMessage msg) throws ServiceException
- Throws:
ServiceException
-
prepare
public void prepare() throws CoreException- Throws:
CoreException
-
initService
protected void initService() throws CoreException- Specified by:
initServicein classServiceImp- Throws:
CoreException
-
closeService
protected void closeService()
- Specified by:
closeServicein classServiceImp
-
getBufferSize
public java.lang.Integer getBufferSize()
-
setBufferSize
public void setBufferSize(java.lang.Integer b)
Set the internal buffer size.This is used when; the default buffer size matches the default buffer size in
BufferedReaderandBufferedWriter, changes to the buffersize will impact performance and memory usage depending on the underlying operating system/disk.- Parameters:
b- the buffer size (default is 8192).
-
bufferSize
protected int bufferSize()
-
getMetadataKey
public java.lang.String getMetadataKey()
-
setMetadataKey
public void setMetadataKey(java.lang.String metadataKey)
-
getInputFactoryBuilder
public XmlInputFactoryBuilder getInputFactoryBuilder()
-
setInputFactoryBuilder
public void setInputFactoryBuilder(XmlInputFactoryBuilder inputFactoryBuilder)
-
withInputFactoryBuilder
public StaxGetRootElementService withInputFactoryBuilder(XmlInputFactoryBuilder b)
-
-