/** * Releases the internal state and configuration associated with this client. * Reopening a new connection requires creating a new client object using the * build() method in this builder. * * @param root The resource returned by the build() method of this * builder class */ public static void closeClient(Object root) { Client client = WebClient.client(root); if (client != null) { client.close(); } }
@Override protected void doStop() throws Exception { super.doStop(); if (resourceProxy != null) { try { WebClient.client(resourceProxy).close(); } catch (Exception e) { log.warn("Error closing LinkedIn REST proxy: " + e.getMessage(), e); } resourceProxy = null; } if (requestFilter != null) { getComponent().closeRequestFilter(requestFilter); requestFilter = null; } }
@Override protected void doStop() throws Exception { super.doStop(); if (resourceProxy != null) { try { WebClient.client(resourceProxy).close(); } catch (Exception e) { log.warn("Error closing LinkedIn REST proxy: {}", e.getMessage(), e); } resourceProxy = null; } if (requestFilter != null) { getComponent().closeRequestFilter(requestFilter); requestFilter = null; } }