Class ClusterUtil
java.lang.Object
com.inductiveautomation.ignition.gateway.cluster.ClusterUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
deserializeObject
(GatewayContext context, byte[] b) Deserializes an object that was serialized by serializeObject().static Object
deserializeObject
(GatewayContext context, byte[] b, Map<String, String> aliasClassPaths) Deserializes an object using some specified alias class(es).static Object
deserializeObject
(GatewayContext context, InputStream stream) static Object
deserializeObject
(GatewayContext context, InputStream stream, Map<String, String> aliasClassPaths) static Object
deserializeObject
(InputStream stream) static byte[]
static byte[]
Serializes an Object so it can be sent over the cluster.static Object
unzipAndDeserializeObject
(GatewayContext context, byte[] b) static Object
unzipAndDeserializeObject
(GatewayContext context, byte[] b, Map<String, String> aliasClassPaths)
-
Constructor Details
-
ClusterUtil
public ClusterUtil()
-
-
Method Details
-
serializeObject
Serializes an Object so it can be sent over the cluster.- Parameters:
o
- Object to serialize.- Returns:
- byte[] representing serialized object.
- Throws:
Exception
-
serializeAndGZipObject
- Throws:
Exception
-
deserializeObject
Deserializes an object that was serialized by serializeObject(). Requires the gateway context so it can resolve classes provided by modules.- Parameters:
b
- byte[] to deserialize.- Returns:
- Object representing the deserialized byte[].
- Throws:
Exception
-
deserializeObject
public static Object deserializeObject(GatewayContext context, byte[] b, Map<String, String> aliasClassPaths) throws ExceptionDeserializes an object using some specified alias class(es). Should be used if object has a class path that has since been changed.- Throws:
Exception
-
unzipAndDeserializeObject
- Throws:
Exception
-
unzipAndDeserializeObject
public static Object unzipAndDeserializeObject(GatewayContext context, byte[] b, Map<String, String> aliasClassPaths) throws Exception- Throws:
Exception
-
deserializeObject
public static Object deserializeObject(GatewayContext context, InputStream stream, Map<String, String> aliasClassPaths) throws Exception- Throws:
Exception
-
deserializeObject
- Throws:
Exception
-
deserializeObject
- Throws:
Exception
-