Class MessageEncoder

java.lang.Object
org.wearefrank.ladybug.MessageEncoderImpl
org.frankframework.ladybug.MessageEncoder
All Implemented Interfaces:
org.wearefrank.ladybug.MessageEncoder

public class MessageEncoder extends org.wearefrank.ladybug.MessageEncoderImpl
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.wearefrank.ladybug.MessageEncoder

    org.wearefrank.ladybug.MessageEncoder.ToStringResult
  • Field Summary

    Fields inherited from class org.wearefrank.ladybug.MessageEncoderImpl

    BASE64_ENCODER, CHARSET_ENCODER_PREFIX, DATE_ENCODER, DATE_PATTERN, DOM_NODE_ENCODER, THROWABLE_ENCODER, TO_STRING_ENCODER, UTF8_ENCODER, WAITING_FOR_STREAM_MESSAGE, XML_ENCODER
  • Constructor Summary

    Constructors
    Constructor
    Description
    MessageEncoder(int maxMessageLength)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    toObject(org.wearefrank.ladybug.Checkpoint checkpoint)
     
    <T> T
    toObject(org.wearefrank.ladybug.Checkpoint originalCheckpoint, T expectedReturnType)
     
    org.wearefrank.ladybug.MessageEncoder.ToStringResult
    toString(Object message, String charset)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MessageEncoder

      public MessageEncoder(int maxMessageLength)
  • Method Details

    • toString

      public org.wearefrank.ladybug.MessageEncoder.ToStringResult toString(Object message, String charset)
      Specified by:
      toString in interface org.wearefrank.ladybug.MessageEncoder
      Overrides:
      toString in class org.wearefrank.ladybug.MessageEncoderImpl
    • toObject

      public Object toObject(org.wearefrank.ladybug.Checkpoint checkpoint)
      Specified by:
      toObject in interface org.wearefrank.ladybug.MessageEncoder
      Overrides:
      toObject in class org.wearefrank.ladybug.MessageEncoderImpl
    • toObject

      public <T> T toObject(org.wearefrank.ladybug.Checkpoint originalCheckpoint, T expectedReturnType)
      Specified by:
      toObject in interface org.wearefrank.ladybug.MessageEncoder
      Overrides:
      toObject in class org.wearefrank.ladybug.MessageEncoderImpl
      Type Parameters:
      T - Unused
      Parameters:
      originalCheckpoint - the checkpoint from the original report that will be used as a stub for the counterpart checkpoint in the report in progress. The original checkpoint holds the string representation and the encoding method used when the original message was encoded and possible other relevant information to determine the original object type. It can be null when the original checkpoint cannot be found (in that case the decision to stub is not based on the original checkpoint but based on a stubbing strategy that stubs certain types of checkpoints). When null the default implementation MessageEncoderImpl will return the default stub message

      invalid reference
      TestTool#DEFAULT_STUB_MESSAGE
      expectedReturnType - The message in the report in progress that needs to be stubbed. Only used to determine the class' type.
      Returns:
      In the case of a Writer of OutputStream, the stubbed message must be written to it, and it must be returned. Else the originalCheckpoint.getMessage() must be converted to THIS type and returned.