Package com.adaptris.core.services
Class Utf8BomRemover
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.services.Utf8BomRemover
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
,Service
,StateManagedComponent
@ComponentProfile(summary="Remove a UTF-8 BOM", tag="service") public class Utf8BomRemover extends ServiceImp
Service that removes UTF8 byte order marks that may be present.This is only really useful when Windows (.NET application or otherwise) generated files are being processed by the adapter. In almost all situations, windows will output a redundant UTF-8 BOM which may cause issues with certain types of XML processing. In the event that no BOM is detected, then nothing is done to the message.
This is a workaround for This Sun JVM bug.
In the adapter configuration file this class is aliased as utf8-bom-remover 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 Utf8BomRemover()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
closeService()
void
doService(AdaptrisMessage msg)
Apply the service to the message.protected void
initService()
void
prepare()
Prepare for initialisation.-
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
Description copied from interface:Service
Apply the service to the message.
- Parameters:
msg
- theAdaptrisMessage
to process- Throws:
ServiceException
- wrapping any underlyingException
s
-
initService
protected void initService()
- Specified by:
initService
in classServiceImp
-
closeService
protected void closeService()
- Specified by:
closeService
in classServiceImp
-
prepare
public void prepare() throws CoreException
Description copied from interface:ComponentLifecycleExtension
Prepare for initialisation.- Throws:
CoreException
-
-