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
InstanceSerializerdeserialize in interface InstanceSerializer<T>bytes - the bytesException - any errorspublic byte[] serialize(ServiceInstance<T> instance) throws Exception
InstanceSerializerserialize in interface InstanceSerializer<T>instance - the instanceException - any errorsCopyright © 2011–2016 The Apache Software Foundation. All rights reserved.