public class JsonInstanceSerializer<T> extends Object implements InstanceSerializer<T>
Constructor and Description |
---|
JsonInstanceSerializer(Class<T> payloadClass) |
Modifier and Type | Method and Description |
---|---|
ServiceInstance<T> |
deserialize(byte[] bytes)
Deserialize a byte array into an instance
|
byte[] |
serialize(ServiceInstance<T> instance)
Serialize an instance into bytes
|
public ServiceInstance<T> deserialize(byte[] bytes) throws Exception
InstanceSerializer
deserialize
in interface InstanceSerializer<T>
bytes
- the bytesException
- any errorspublic byte[] serialize(ServiceInstance<T> instance) throws Exception
InstanceSerializer
serialize
in interface InstanceSerializer<T>
instance
- the instanceException
- any errorsCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.