/** * Creates an object that can start a socket server on the given port in a new thread. The socket server will listen * for and respond to requests from the agent using the given request handler. * * @param requestHandler * - the {@link RequestHandler} instance that will be used for request handling * @param port * - port on which to open a socket server * @throws IOException * - if the input or output stream initialization fails */ public OnDeviceSocketServer(RequestHandler<T> requestHandler, int port) throws IOException { connectionHandler = new SocketConnectionHandler<T>(requestHandler, port); }