/** * Creates a socket server on the given port. The socket server receives and responds to agent requests using the * 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 SocketConnectionHandler(RequestHandler<T> requestHandler, int port) throws IOException { socketServer = new DeviceSocketServer<T>(requestHandler, port); isRunning = false; }