Class SwiftMxDataFormat
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.dataformat.swift.mx.SwiftMxDataFormat
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.DataFormat,org.apache.camel.spi.DataFormatName,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@Dataformat("swiftMx")
@Metadata(firstVersion="3.20.0",
title="SWIFT MX")
public class SwiftMxDataFormat
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.DataFormat, org.apache.camel.spi.DataFormatName
SwiftMxDataFormat is a specific DataFormat leveraging
Prowide ISO 20022 to encode and decode SWIFT MX messages.-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionConstructs aSwiftMxDataFormatwith the default configuration.SwiftMxDataFormat(boolean writeInJson, com.prowidesoftware.swift.model.MxId readMessageId, com.prowidesoftware.swift.model.mx.MxReadConfiguration readConfig) Constructs aSwiftMxDataFormatwith the given parameters.SwiftMxDataFormat(com.prowidesoftware.swift.model.mx.MxWriteConfiguration writeConfig, com.prowidesoftware.swift.model.MxId readMessageId, com.prowidesoftware.swift.model.mx.MxReadConfiguration readConfig) Constructs aSwiftMxDataFormatwith the given parameters. -
Method Summary
Modifier and TypeMethodDescriptioncom.prowidesoftware.swift.model.mx.MxReadConfigurationcom.prowidesoftware.swift.model.MxIdcom.prowidesoftware.swift.model.mx.MxWriteConfigurationvoidinit()booleanvoidmarshal(org.apache.camel.Exchange exchange, Object object, OutputStream stream) voidsetReadConfig(com.prowidesoftware.swift.model.mx.MxReadConfiguration readConfig) voidsetReadMessageId(com.prowidesoftware.swift.model.MxId readMessageId) voidsetWriteConfig(com.prowidesoftware.swift.model.mx.MxWriteConfiguration writeConfig) voidsetWriteInJson(boolean writeInJson) unmarshal(org.apache.camel.Exchange exchange, InputStream stream) Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getInternalLock, getStatus, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.spi.DataFormat
unmarshalMethods inherited from interface org.apache.camel.Service
build, close, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
SwiftMxDataFormat
public SwiftMxDataFormat()Constructs aSwiftMxDataFormatwith the default configuration. -
SwiftMxDataFormat
public SwiftMxDataFormat(boolean writeInJson, com.prowidesoftware.swift.model.MxId readMessageId, com.prowidesoftware.swift.model.mx.MxReadConfiguration readConfig) Constructs aSwiftMxDataFormatwith the given parameters.- Parameters:
writeInJson- the flag indicating that messages must be marshalled in a JSON format.readMessageId- the type of MX message to produce when unmarshalling an input stream. If not set, it will be automatically detected from the namespace used.readConfig- the specific configuration to use when unmarshalling an input stream.
-
SwiftMxDataFormat
public SwiftMxDataFormat(com.prowidesoftware.swift.model.mx.MxWriteConfiguration writeConfig, com.prowidesoftware.swift.model.MxId readMessageId, com.prowidesoftware.swift.model.mx.MxReadConfiguration readConfig) Constructs aSwiftMxDataFormatwith the given parameters.- Parameters:
writeConfig- the specific configuration to use when marshalling a message.readMessageId- the type of MX message to produce when unmarshalling an input stream. If not set, it will be automatically detected from the namespace used.readConfig- the specific configuration to use when unmarshalling an input stream.
-
-
Method Details
-
getDataFormatName
- Specified by:
getDataFormatNamein interfaceorg.apache.camel.spi.DataFormatName
-
marshal
public void marshal(org.apache.camel.Exchange exchange, Object object, OutputStream stream) throws Exception - Specified by:
marshalin interfaceorg.apache.camel.spi.DataFormat- Throws:
Exception
-
unmarshal
- Specified by:
unmarshalin interfaceorg.apache.camel.spi.DataFormat- Throws:
Exception
-
init
public void init()- Specified by:
initin interfaceorg.apache.camel.Service- Overrides:
initin classorg.apache.camel.support.service.BaseService
-
getReadMessageId
public com.prowidesoftware.swift.model.MxId getReadMessageId() -
setReadMessageId
public void setReadMessageId(com.prowidesoftware.swift.model.MxId readMessageId) -
getReadConfig
public com.prowidesoftware.swift.model.mx.MxReadConfiguration getReadConfig() -
setReadConfig
public void setReadConfig(com.prowidesoftware.swift.model.mx.MxReadConfiguration readConfig) -
getWriteConfig
public com.prowidesoftware.swift.model.mx.MxWriteConfiguration getWriteConfig() -
setWriteConfig
public void setWriteConfig(com.prowidesoftware.swift.model.mx.MxWriteConfiguration writeConfig) -
isWriteInJson
public boolean isWriteInJson() -
setWriteInJson
public void setWriteInJson(boolean writeInJson)
-