Java Code Examples for org.apache.cxf.transports.http.configuration.HTTPClientPolicy#isAutoRedirect()
The following examples show how to use
org.apache.cxf.transports.http.configuration.HTTPClientPolicy#isAutoRedirect() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClientPolicyCalculator.java From cxf with Apache License 2.0 | 5 votes |
/** * Determines if two HTTPClientPolicy objects are equal. REVISIT: Check if * this can be replaced by a generated equals method. * * @param p1 one client policy * @param p2 another client policy * @return true iff the two policies are equal */ public boolean equals(HTTPClientPolicy p1, HTTPClientPolicy p2) { if (p1 == p2) { return true; } boolean result = true; result &= (p1.isAllowChunking() == p2.isAllowChunking()) && (p1.isAutoRedirect() == p2.isAutoRedirect()) && StringUtils.equals(p1.getAccept(), p2.getAccept()) && StringUtils.equals(p1.getAcceptEncoding(), p2.getAcceptEncoding()) && StringUtils.equals(p1.getAcceptLanguage(), p2.getAcceptLanguage()) && StringUtils.equals(p1.getBrowserType(), p2.getBrowserType()); if (!result) { return false; } result &= (p1.getCacheControl() == null ? p2.getCacheControl() == null : p1.getCacheControl() .equals(p2.getCacheControl()) && p1.getConnection().value().equals(p2.getConnection().value())) && (p1.getConnectionTimeout() == p2.getConnectionTimeout()) && StringUtils.equals(p1.getContentType(), p2.getContentType()) && StringUtils.equals(p1.getCookie(), p2.getCookie()) && StringUtils.equals(p1.getDecoupledEndpoint(), p2.getDecoupledEndpoint()) && StringUtils.equals(p1.getHost(), p2.getHost()); if (!result) { return false; } result &= StringUtils.equals(p1.getProxyServer(), p2.getProxyServer()) && (p1.isSetProxyServerPort() ? p1.getProxyServerPort().equals(p2.getProxyServerPort()) : !p2 .isSetProxyServerPort()) && p1.getProxyServerType().value().equals(p2.getProxyServerType().value()) && (p1.getConnectionRequestTimeout() == p2.getConnectionRequestTimeout()) && (p1.getReceiveTimeout() == p2.getReceiveTimeout()) && StringUtils.equals(p1.getReferer(), p2.getReferer()); return result; }