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

    Constructors
    Constructor
    Description
    Constructs a SwiftMxDataFormat with the default configuration.
    SwiftMxDataFormat(boolean writeInJson, com.prowidesoftware.swift.model.MxId readMessageId, com.prowidesoftware.swift.model.mx.MxReadConfiguration readConfig)
    Constructs a SwiftMxDataFormat with 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 a SwiftMxDataFormat with the given parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    com.prowidesoftware.swift.model.mx.MxReadConfiguration
     
    com.prowidesoftware.swift.model.MxId
     
    com.prowidesoftware.swift.model.mx.MxWriteConfiguration
     
    void
     
    boolean
     
    void
    marshal(org.apache.camel.Exchange exchange, Object object, OutputStream stream)
     
    void
    setReadConfig(com.prowidesoftware.swift.model.mx.MxReadConfiguration readConfig)
     
    void
    setReadMessageId(com.prowidesoftware.swift.model.MxId readMessageId)
     
    void
    setWriteConfig(com.prowidesoftware.swift.model.mx.MxWriteConfiguration writeConfig)
     
    void
    setWriteInJson(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, suspend

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.camel.spi.DataFormat

    unmarshal

    Methods inherited from interface org.apache.camel.Service

    build, close, start, stop

    Methods inherited from interface org.apache.camel.ShutdownableService

    shutdown

    Methods inherited from interface org.apache.camel.StatefulService

    getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending

    Methods inherited from interface org.apache.camel.SuspendableService

    isSuspended, resume, suspend
  • Constructor Details

    • SwiftMxDataFormat

      public SwiftMxDataFormat()
      Constructs a SwiftMxDataFormat with the default configuration.
    • SwiftMxDataFormat

      public SwiftMxDataFormat(boolean writeInJson, com.prowidesoftware.swift.model.MxId readMessageId, com.prowidesoftware.swift.model.mx.MxReadConfiguration readConfig)
      Constructs a SwiftMxDataFormat with 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 a SwiftMxDataFormat with 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

      public String getDataFormatName()
      Specified by:
      getDataFormatName in interface org.apache.camel.spi.DataFormatName
    • marshal

      public void marshal(org.apache.camel.Exchange exchange, Object object, OutputStream stream) throws Exception
      Specified by:
      marshal in interface org.apache.camel.spi.DataFormat
      Throws:
      Exception
    • unmarshal

      public Object unmarshal(org.apache.camel.Exchange exchange, InputStream stream) throws Exception
      Specified by:
      unmarshal in interface org.apache.camel.spi.DataFormat
      Throws:
      Exception
    • init

      public void init()
      Specified by:
      init in interface org.apache.camel.Service
      Overrides:
      init in class org.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)