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 java.lang.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TagProviderService2VersionAdapter.ParameterVersionJavaSerializationCodec.CustomObjectOutputStream
-
Constructor Summary
Constructors Modifier Constructor Description protected
ParameterVersionJavaSerializationCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.io.ObjectInputStream
createObjectInputStream(java.io.InputStream is)
Note that when Metro is used with Ignition, this method never gets called.java.lang.Object
decode(java.io.InputStream inputStream)
java.io.InputStream
encode(java.lang.Object data)
java.lang.String
getId()
protected byte[]
serialize(java.io.Serializable object)
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
logger
protected static final org.apache.log4j.Logger logger
-
-
Method Detail
-
getId
public java.lang.String getId()
- Specified by:
getId
in interfacecom.inductiveautomation.metro.api.MessageCodec
-
serialize
protected byte[] serialize(java.io.Serializable object) throws java.io.IOException
- Throws:
java.io.IOException
-
encode
public java.io.InputStream encode(java.lang.Object data) throws java.lang.Exception
- Specified by:
encode
in interfacecom.inductiveautomation.metro.api.MessageCodec
- Throws:
java.lang.Exception
-
decode
public java.lang.Object decode(java.io.InputStream inputStream) throws java.lang.Exception
- Specified by:
decode
in interfacecom.inductiveautomation.metro.api.MessageCodec
- Throws:
java.lang.Exception
-
createObjectInputStream
protected java.io.ObjectInputStream createObjectInputStream(java.io.InputStream is) throws java.io.IOException
Note that when Metro is used with Ignition, this method never gets called. Instead, ModuleSerializationCodec.createObjectInputStream gets called.- Throws:
java.io.IOException
-
-