Class TagProviderService2VersionAdapter.ParameterVersionJavaSerializationCodec

java.lang.Object
com.inductiveautomation.ignition.gateway.tags.distributed.TagProviderService2VersionAdapter.ParameterVersionJavaSerializationCodec
All Implemented Interfaces:
com.inductiveautomation.metro.api.MessageCodec
Enclosing class:
TagProviderService2VersionAdapter

protected static class TagProviderService2VersionAdapter.ParameterVersionJavaSerializationCodec extends Object implements com.inductiveautomation.metro.api.MessageCodec
This class does some trickery to avoid sending our new Parameters and ParameterValues to old gateays. It uses a custom serializer to swap those out for objects that are compatible with older version.
  • Field Details

  • Constructor Details

    • ParameterVersionJavaSerializationCodec

      protected ParameterVersionJavaSerializationCodec()
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface com.inductiveautomation.metro.api.MessageCodec
    • serialize

      protected byte[] serialize(Serializable object) throws IOException
      Throws:
      IOException
    • encode

      public InputStream encode(Object data) throws Exception
      Specified by:
      encode in interface com.inductiveautomation.metro.api.MessageCodec
      Throws:
      Exception
    • decode

      public Object decode(InputStream inputStream) throws Exception
      Specified by:
      decode in interface com.inductiveautomation.metro.api.MessageCodec
      Throws:
      Exception
    • createObjectInputStream

      protected ObjectInputStream createObjectInputStream(InputStream is) throws IOException
      Note that when Metro is used with Ignition, this method never gets called. Instead, ModuleSerializationCodec.createObjectInputStream gets called.
      Throws:
      IOException