protected static int determineConnectionTimeout(Message message, HTTPClientPolicy csPolicy) { long ctimeout = csPolicy.getConnectionTimeout(); if (message.get(Message.CONNECTION_TIMEOUT) != null) { Object obj = message.get(Message.CONNECTION_TIMEOUT); try { ctimeout = Long.parseLong(obj.toString()); } catch (NumberFormatException e) { LOG.log(Level.WARNING, "INVALID_TIMEOUT_FORMAT", new Object[] { Message.CONNECTION_TIMEOUT, obj.toString() }); } } if (ctimeout > Integer.MAX_VALUE) { ctimeout = Integer.MAX_VALUE; } return (int)ctimeout; }
&& (p1.getConnectionTimeout() == p2.getConnectionTimeout()) && StringUtils.equals(p1.getContentType(), p2.getContentType()) && StringUtils.equals(p1.getCookie(), p2.getCookie())
protected static int determineConnectionTimeout(Message message, HTTPClientPolicy csPolicy) { long ctimeout = csPolicy.getConnectionTimeout(); if (message.get(Message.CONNECTION_TIMEOUT) != null) { Object obj = message.get(Message.CONNECTION_TIMEOUT); try { ctimeout = Long.parseLong(obj.toString()); } catch (NumberFormatException e) { LOG.log(Level.WARNING, "INVALID_TIMEOUT_FORMAT", new Object[] { Message.CONNECTION_TIMEOUT, obj.toString() }); } } if (ctimeout > Integer.MAX_VALUE) { ctimeout = Integer.MAX_VALUE; } return (int)ctimeout; }
protected static int determineConnectionTimeout(Message message, HTTPClientPolicy csPolicy) { long ctimeout = csPolicy.getConnectionTimeout(); if (message.get(Message.CONNECTION_TIMEOUT) != null) { Object obj = message.get(Message.CONNECTION_TIMEOUT); try { ctimeout = Long.parseLong(obj.toString()); } catch (NumberFormatException e) { LOG.log(Level.WARNING, "INVALID_TIMEOUT_FORMAT", new Object[] { Message.CONNECTION_TIMEOUT, obj.toString() }); } } if (ctimeout > Integer.MAX_VALUE) { ctimeout = Integer.MAX_VALUE; } return (int)ctimeout; }
/** * Get the current HTTP timeout value for a service port * * @param serviceApi * The object representing the service API port * @return The timeout in milliseconds for the provided API port */ protected long getTimeout(Object serviceApi) { org.apache.cxf.endpoint.Client client = org.apache.cxf.frontend.ClientProxy.getClient(serviceApi); /* get timeout */ HTTPConduit http = (HTTPConduit) client.getConduit(); HTTPClientPolicy httpClientPolicy = http.getClient(); return httpClientPolicy.getConnectionTimeout(); }
if (session == null) { try { sessionLock.wait(csPolicy.getConnectionTimeout()); } catch (InterruptedException e) { throw new IOException(e);
.setConnectTimeout((int) csPolicy.getConnectionTimeout()) .setSocketTimeout((int) csPolicy.getReceiveTimeout()) .setConnectionRequestTimeout((int) csPolicy.getConnectionRequestTimeout());
p.setConnectionTimeout(p1.getConnectionTimeout()); } else if (p2.isSetConnectionTimeout()) { p.setConnectionTimeout(p2.getConnectionTimeout());
&& (p1.getConnectionTimeout() == p2.getConnectionTimeout()) && StringUtils.equals(p1.getContentType(), p2.getContentType()) && StringUtils.equals(p1.getCookie(), p2.getCookie())
&& (p1.getConnectionTimeout() == p2.getConnectionTimeout()) && StringUtils.equals(p1.getContentType(), p2.getContentType()) && StringUtils.equals(p1.getCookie(), p2.getCookie())
p.setConnectionTimeout(p1.getConnectionTimeout()); } else if (p2.isSetConnectionTimeout()) { p.setConnectionTimeout(p2.getConnectionTimeout());
p.setConnectionTimeout(p1.getConnectionTimeout()); } else if (p2.isSetConnectionTimeout()) { p.setConnectionTimeout(p2.getConnectionTimeout());