This repository has been archived on 2021-12-05. You can view files and clone it, but cannot push or open issues or pull requests.
envoy/server/src/main/java/envoy/server/processors/ObjectProcessor.java

25 lines
768 B
Java
Executable File

package envoy.server.processors;
import java.io.IOException;
import envoy.server.net.ObjectWriteProxy;
/**
* This interface defines methods for processing objects of a specific type incoming from a client.
*
* @author Kai S. K. Engelbart
* @param <T> type of the request object
* @since Envoy Server Standalone v0.1-alpha
*/
public interface ObjectProcessor<T> {
/**
* @param input the request object
* @param socketID the ID of the socket from which the object was received
* @param writeProxy the object that allows writing to a client
* @throws IOException if something went wrong during processing
* @since Envoy Server Standalone v0.1-alpha
*/
void process(T input, long socketID, ObjectWriteProxy writeProxy) throws IOException;
}