Class StringCodec

  • All Implemented Interfaces:
    eu.vstoyanov.natsy.codec.MessageCodec

    
    public final class StringCodec
     implements MessageCodec<String>
                        

    Simple string codec for text messages

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final String contentType
    • Constructor Summary

      Constructors 
      Constructor Description
      StringCodec()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getContentType() Content type identifier for this codec
      ByteArray encode(String value) Encode a value for publishing.
      String decode(ByteArray data) Decode bytes received from NATS.
      • Methods inherited from class java.lang.Object

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