26 lines
771 B
Java
Executable File
26 lines
771 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;
|
|
}
|