Class NoopPayloadTransformer

  • All Implemented Interfaces:
    TaskPayloadTransformer<java.lang.String>

    public final class NoopPayloadTransformer
    extends java.lang.Object
    implements TaskPayloadTransformer<java.lang.String>
    Default payload transformer, which performs no transformation and returns the same string as in the raw payload.

    Use where no transformation required.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String fromObject​(java.lang.String payload)
      Marshall the typed object with task parameters into string payload.
      static NoopPayloadTransformer getInstance()
      Get payload transformer instance.
      java.lang.String toObject​(java.lang.String payload)
      Unmarshall the string payload from the task into the object with task data
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static NoopPayloadTransformer getInstance()
        Get payload transformer instance.
        Returns:
        Singleton of transformer.
      • toObject

        @Nullable
        public java.lang.String toObject​(@Nullable
                                         java.lang.String payload)
        Description copied from interface: TaskPayloadTransformer
        Unmarshall the string payload from the task into the object with task data
        Specified by:
        toObject in interface TaskPayloadTransformer<java.lang.String>
        Parameters:
        payload - task payload
        Returns:
        Object with task data
      • fromObject

        @Nullable
        public java.lang.String fromObject​(@Nullable
                                           java.lang.String payload)
        Description copied from interface: TaskPayloadTransformer
        Marshall the typed object with task parameters into string payload.
        Specified by:
        fromObject in interface TaskPayloadTransformer<java.lang.String>
        Parameters:
        payload - task payload
        Returns:
        string with the task payload.