logger.trace("Client BinRpcRequest {}", request);
}
socket = new Socket(context.getConfig().getHost(), hmInterface.getPort());
socket.setSoTimeout(5000);
socket.getOutputStream().write(request.createMessage());
BinRpcResponse resp = new BinRpcResponse(socket.getInputStream(), false);
if (TRACE_ENABLED) {
logger.trace("Client BinRpcResponse: {}", resp.toString());
}
Object[] data = resp.getResponseData();
if (data != null && data.length > 0) {
Object responseData = data[0];
if (responseData instanceof Map) {
@SuppressWarnings("unchecked")
Map<String, Object> map = (Map<String, Object>) responseData;