io.probedock.client.core.serializer.ProbeSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of probe-dock-java Show documentation
Show all versions of probe-dock-java Show documentation
Base code to write Probe Dock clients in Java
The newest version!
package io.probedock.client.core.serializer;
import io.probedock.client.common.model.ProbeTestRun;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
/**
* Serializer interface
*
* @author Laurent Prevost
*/
public interface ProbeSerializer {
/**
* Serialize a payload
*
* @param osw Output stream
* @param payload The payload to serialize
* @param pretty Whether to indent the output
* @exception IOException
*/
void serializePayload(OutputStreamWriter osw, ProbeTestRun payload, boolean pretty) throws IOException;
/**
* Deserialize a payload
*
* @param The type of payload to deserialize
* @param isr Input stream
* @param clazz The type to deserialize
* @return Payload The payload deserialized
* @throws IOException I/O Errors
*/
T deserializePayload(InputStreamReader isr, Class clazz) throws IOException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy