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/src/main/java/envoy/server/ObjectProcessor.java

31 lines
870 B
Java

package envoy.server;
/**
* This interface defines methods for processing objects of a specific
* type incoming from a client.<br>
* <br>
* Project: <strong>envoy-server-standalone</strong><br>
* File: <strong>ObjectProcessor.java</strong><br>
* Created: <strong>30.12.2019</strong><br>
*
* @author Kai S. K. Engelbart
* @param <T> type of the request object
* @param <U> type of the response object
* @since Envoy Server Standalone v0.1-alpha
*/
public interface ObjectProcessor<T, U> {
/**
* @return the Class of the request object
* @since Envoy Server Standalone v0.1-alpha
*/
Class<T> getInputClass();
/**
* @param input the request object
* @param socketId the ID of the socket from which the object was received
* @return the response object
* @since Envoy Server Standalone v0.1-alpha
*/
U process(T input, long socketId);
}