Class HexToStringService
java.lang.Object
com.adaptris.core.ServiceImp
com.adaptris.core.services.metadata.MetadataServiceImpl
com.adaptris.core.services.metadata.ReformatMetadata
com.adaptris.core.services.metadata.HexToStringService
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
,Service
,MetadataReformatter
,StateManagedComponent
- Direct Known Subclasses:
StringToHexService
@ComponentProfile(summary="Turn a hex encoded string into a java string using the specified character encoding",
tag="service,metadata")
public class HexToStringService
extends ReformatMetadata
This class will decode hex encoded metadata value(s) using the specified character encoding
- See Also:
In the adapter configuration file this class is aliased as hex-to-string-metadata-service which is the preferred alternative to the fully qualified classname when building your configuration.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.adaptris.core.services.metadata.MetadataServiceImpl
MetadataServiceImpl.LogWrapper
-
Field Summary
Fields inherited from class com.adaptris.core.services.metadata.MetadataServiceImpl
DEBUG, ERROR, INFO, TRACE, WARN
Fields inherited from class com.adaptris.core.ServiceImp
log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
Reformat a metadata valuevoid
setCharset
(String encoding) The character encoding to be applied when decoding the hex string.Methods inherited from class com.adaptris.core.services.metadata.ReformatMetadata
doService, getMetadataKeyRegexp, setMetadataKeyRegexp
Methods inherited from class com.adaptris.core.services.metadata.MetadataServiceImpl
closeService, getMetadataLogger, initService, logMetadata, logMetadata, logMetadata, logMetadata, prepare, setMetadataLogger, withMetadataLogger
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.adaptris.core.services.metadata.MetadataReformatter
reformat
-
Field Details
-
UTF_8
- See Also:
-
-
Constructor Details
-
HexToStringService
public HexToStringService() -
HexToStringService
-
-
Method Details
-
getCharset
-
setCharset
The character encoding to be applied when decoding the hex string. If no encoding is specified, UTF8 will be used.- Parameters:
encoding
-
-
getCharacterEncoding
-
reformat
Description copied from interface:MetadataReformatter
Reformat a metadata value- Parameters:
s
- the string to reformatmsgCharset
- the charset of the message- Returns:
- the replacment string.
- Throws:
Exception
-