Removed code deprecated in release 4.0

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1337893 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2012-05-13 14:11:39 +00:00
parent 1b063abfa9
commit 7a207ae475
12 changed files with 35 additions and 245 deletions

7
.pydevproject Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
</pydev_project>

View File

@ -1,4 +1,4 @@
Changes since 4.2 BETA1
Release 4.2
-------------------
* [HTTPCLIENT-1187] If a revalidation response is deemed too old CachingHttpClient fails to
@ -16,6 +16,31 @@ Changes since 4.2 BETA1
* [HTTPCLIENT-1177] always remove fragments from request URIs
Contributed by Oleg Kalnichevski <olegk at apache.org>
Incompatible changes
--------------------
[Compared to release version 4.1.3]
The following fields have been deprecated for some time now and have been deleted:
org.apache.http.client.params.ClientPNames#CONNECTION_MANAGER_FACTORY
org.apache.http.impl.cookie.BrowserCompatSpec#DATE_PATTERNS
The following methods have been deprecated for some time now and have been deleted:
org.apache.http.client.params.ClientParamBean#setConnectionManagerFactory(org.apache.http.conn.ClientConnectionManagerFactory)
org.apache.http.client.protocol.ClientContextConfigurer#setAuthSchemePref(java.util.List)
org.apache.http.entity.mime.content.FileBody#writeTo(java.io.OutputStream, int)
org.apache.http.entity.mime.content.InputStreamBody#writeTo(java.io.OutputStream, int)
org.apache.http.entity.mime.content.StringBody#writeTo(java.io.OutputStream, int)
The following classes have been deprecated for some while now and have been deleted:
org.apache.http.impl.conn.tsccm.RefQueueHandler
org.apache.http.impl.conn.tsccm.AbstractConnPool no longer implements interface org.apache.http.impl.conn.tsccm.RefQueueHandler
org.apache.http.impl.conn.tsccm.ConnPoolByRoute no longer implements interface org.apache.http.impl.conn.tsccm.RefQueueHandler
org.apache.http.impl.conn.tsccm.RefQueueWorker
Release 4.2 BETA1
-------------------

View File

@ -39,12 +39,6 @@ public interface ClientPNames {
@Deprecated
public static final String CONNECTION_MANAGER_FACTORY_CLASS_NAME = "http.connection-manager.factory-class-name";
/**
* @deprecated (4.0) do not use
*/
@Deprecated
public static final String CONNECTION_MANAGER_FACTORY = "http.connection-manager.factory-object";
/**
* Defines whether redirects should be handled automatically
* <p>

View File

@ -33,7 +33,6 @@ import org.apache.http.annotation.NotThreadSafe;
import org.apache.http.Header;
import org.apache.http.HttpHost;
import org.apache.http.conn.ClientConnectionManagerFactory;
import org.apache.http.params.HttpAbstractParamBean;
import org.apache.http.params.HttpParams;
@ -52,21 +51,13 @@ public class ClientParamBean extends HttpAbstractParamBean {
}
/**
* @deprecated (4.0) do not use.
* @deprecated (4.2) do not use.
*/
@Deprecated
public void setConnectionManagerFactoryClassName (final String factory) {
params.setParameter(ClientPNames.CONNECTION_MANAGER_FACTORY_CLASS_NAME, factory);
}
/**
* @deprecated (4.2) do not use.
*/
@Deprecated
public void setConnectionManagerFactory(ClientConnectionManagerFactory factory) {
params.setParameter(ClientPNames.CONNECTION_MANAGER_FACTORY, factory);
}
public void setHandleRedirects (final boolean handle) {
params.setBooleanParameter(ClientPNames.HANDLE_REDIRECTS, handle);
}

View File

@ -70,14 +70,4 @@ public class ClientContextConfigurer implements ClientContext {
this.context.setAttribute(CREDS_PROVIDER, provider);
}
/**
* @deprecated (4.0) Use {@link HttpParams#setParameter(String, Object)} to set the parameters
* {@link org.apache.http.auth.params.AuthPNames#TARGET_AUTH_PREF AuthPNames#TARGET_AUTH_PREF} and
* {@link org.apache.http.auth.params.AuthPNames#PROXY_AUTH_PREF AuthPNames#PROXY_AUTH_PREF} instead
*/
@Deprecated
public void setAuthSchemePref(final List<String> list) {
this.context.setAttribute(AUTH_SCHEME_PREF, list);
}
}

View File

@ -57,7 +57,7 @@ import org.apache.http.impl.conn.IdleConnectionHandler;
* @deprecated (4.2) use {@link org.apache.http.pool.AbstractConnPool}
*/
@Deprecated
public abstract class AbstractConnPool implements RefQueueHandler {
public abstract class AbstractConnPool {
private final Log log;

View File

@ -1,46 +0,0 @@
/*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.impl.conn.tsccm;
import java.lang.ref.Reference;
/**
* @deprecated (4.0) do not use
*
* @since 4.0
*/
@Deprecated
public interface RefQueueHandler {
/**
* Invoked when a reference is found on the queue.
*
* @param ref the reference to handle
*/
public void handleReference(Reference<?> ref)
;
}

View File

@ -1,126 +0,0 @@
/*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.impl.conn.tsccm;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
/**
* A worker thread for processing queued references.
* {@link Reference Reference}s can be
* {@link ReferenceQueue queued}
* automatically by the garbage collector.
* If that feature is used, a daemon thread should be executing
* this worker. It will pick up the queued references and pass them
* on to a handler for appropriate processing.
*
* @deprecated (4.0) do not use
*/
@Deprecated
public class RefQueueWorker implements Runnable {
/** The reference queue to monitor. */
protected final ReferenceQueue<?> refQueue;
/** The handler for the references found. */
protected final RefQueueHandler refHandler;
/**
* The thread executing this handler.
* This attribute is also used as a shutdown indicator.
*/
protected volatile Thread workerThread;
/**
* Instantiates a new worker to listen for lost connections.
*
* @param queue the queue on which to wait for references
* @param handler the handler to pass the references to
*/
public RefQueueWorker(ReferenceQueue<?> queue, RefQueueHandler handler) {
if (queue == null) {
throw new IllegalArgumentException("Queue must not be null.");
}
if (handler == null) {
throw new IllegalArgumentException("Handler must not be null.");
}
refQueue = queue;
refHandler = handler;
}
/**
* The main loop of this worker.
* If initialization succeeds, this method will only return
* after {@link #shutdown shutdown()}. Only one thread can
* execute the main loop at any time.
*/
public void run() {
if (this.workerThread == null) {
this.workerThread = Thread.currentThread();
}
while (this.workerThread == Thread.currentThread()) {
try {
// remove the next reference and process it
Reference<?> ref = refQueue.remove();
refHandler.handleReference(ref);
} catch (InterruptedException ignore) {
}
}
}
/**
* Shuts down this worker.
* It can be re-started afterwards by another call to {@link #run run()}.
*/
public void shutdown() {
Thread wt = this.workerThread;
if (wt != null) {
this.workerThread = null; // indicate shutdown
wt.interrupt();
}
}
/**
* Obtains a description of this worker.
*
* @return a descriptive string for this worker
*/
@Override
public String toString() {
return "RefQueueWorker::" + this.workerThread;
}
} // class RefQueueWorker

View File

@ -55,27 +55,6 @@ import org.apache.http.util.CharArrayBuffer;
@NotThreadSafe // superclass is @NotThreadSafe
public class BrowserCompatSpec extends CookieSpecBase {
/**
* @deprecated (4.0) do not use
*/
@Deprecated
protected static final String[] DATE_PATTERNS = new String[] {
DateUtils.PATTERN_RFC1123,
DateUtils.PATTERN_RFC1036,
DateUtils.PATTERN_ASCTIME,
"EEE, dd-MMM-yyyy HH:mm:ss z",
"EEE, dd-MMM-yyyy HH-mm-ss z",
"EEE, dd MMM yy HH:mm:ss z",
"EEE dd-MMM-yyyy HH:mm:ss z",
"EEE dd MMM yyyy HH:mm:ss z",
"EEE dd-MMM-yyyy HH-mm-ss z",
"EEE dd-MMM-yy HH:mm:ss z",
"EEE dd MMM yy HH:mm:ss z",
"EEE,dd-MMM-yy HH:mm:ss z",
"EEE,dd-MMM-yyyy HH:mm:ss z",
"EEE, dd-MM-yyyy HH:mm:ss z",
};
private static final String[] DEFAULT_DATE_PATTERNS = new String[] {
DateUtils.PATTERN_RFC1123,
DateUtils.PATTERN_RFC1036,

View File

@ -85,14 +85,6 @@ public class FileBody extends AbstractContentBody {
return new FileInputStream(this.file);
}
/**
* @deprecated (4.0) use {@link #writeTo(OutputStream)}
*/
@Deprecated
public void writeTo(final OutputStream out, int mode) throws IOException {
writeTo(out);
}
public void writeTo(final OutputStream out) throws IOException {
if (out == null) {
throw new IllegalArgumentException("Output stream may not be null");

View File

@ -59,14 +59,6 @@ public class InputStreamBody extends AbstractContentBody {
return this.in;
}
/**
* @deprecated (4.0) use {@link #writeTo(OutputStream)}
*/
@Deprecated
public void writeTo(final OutputStream out, int mode) throws IOException {
writeTo(out);
}
public void writeTo(final OutputStream out) throws IOException {
if (out == null) {
throw new IllegalArgumentException("Output stream may not be null");

View File

@ -132,14 +132,6 @@ public class StringBody extends AbstractContentBody {
this.charset);
}
/**
* @deprecated (4.0) use {@link #writeTo(OutputStream)}
*/
@Deprecated
public void writeTo(final OutputStream out, int mode) throws IOException {
writeTo(out);
}
public void writeTo(final OutputStream out) throws IOException {
if (out == null) {
throw new IllegalArgumentException("Output stream may not be null");