Class BaSyxVABTCPPayloadCodec

  • All Implemented Interfaces:
    de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder.PayloadCodec

    public class BaSyxVABTCPPayloadCodec
    extends java.lang.Object
    implements de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder.PayloadCodec
    A BaSyx TCP payload codec in the style of TCP VAB, but on generic payload. We introduced this codec because TCP VAB closes its connection after each data frame.
    Author:
    Holger Eichelberger, SSE
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.nio.charset.Charset charset  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void decode​(byte[] data, de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder.PayloadConsumer consumer)  
      int decodeDataLength​(byte[] data)  
      byte[] encode​(java.lang.String info, byte[] payload)  
      java.nio.charset.Charset getCharset()  
      int getDataBytesLength()  
      de.iip_ecosphere.platform.support.Schema intendedSchema()  
      void setCharset​(java.nio.charset.Charset charset)  
      • Methods inherited from class java.lang.Object

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

      • charset

        private java.nio.charset.Charset charset
    • Constructor Detail

      • BaSyxVABTCPPayloadCodec

        public BaSyxVABTCPPayloadCodec()
    • Method Detail

      • getCharset

        public java.nio.charset.Charset getCharset()
        Specified by:
        getCharset in interface de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder.PayloadCodec
      • setCharset

        public void setCharset​(java.nio.charset.Charset charset)
        Specified by:
        setCharset in interface de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder.PayloadCodec
      • intendedSchema

        public de.iip_ecosphere.platform.support.Schema intendedSchema()
        Specified by:
        intendedSchema in interface de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder.PayloadCodec
      • encode

        public byte[] encode​(java.lang.String info,
                             byte[] payload)
        Specified by:
        encode in interface de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder.PayloadCodec
      • getDataBytesLength

        public int getDataBytesLength()
        Specified by:
        getDataBytesLength in interface de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder.PayloadCodec
      • decodeDataLength

        public int decodeDataLength​(byte[] data)
        Specified by:
        decodeDataLength in interface de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder.PayloadCodec
      • decode

        public void decode​(byte[] data,
                           de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder.PayloadConsumer consumer)
        Specified by:
        decode in interface de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder.PayloadCodec