com.atlassian.httpclient.base
Class RequestKiller

java.lang.Object
  extended by com.atlassian.httpclient.base.RequestKiller
All Implemented Interfaces:
java.lang.Runnable, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

public final class RequestKiller
extends java.lang.Object
implements java.lang.Runnable, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean

A request killer for ensuring a request doesn't take too long. While connection and socket timeouts deal with waiting for an TCP connection and a long delay in new content, respectively, this thread kills requests that may be trickling content down in such a way that doesn't trip the socket timeout.


Constructor Summary
RequestKiller()
           
 
Method Summary
 void afterPropertiesSet()
           
 void completedRequest(org.apache.http.client.methods.AbortableHttpRequest request)
           
 void destroy()
           
 void registerRequest(org.apache.http.client.methods.AbortableHttpRequest request, int secondsToLive)
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestKiller

public RequestKiller()
Method Detail

registerRequest

public void registerRequest(org.apache.http.client.methods.AbortableHttpRequest request,
                            int secondsToLive)

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

destroy

public void destroy()
             throws java.lang.Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
java.lang.Exception

run

public void run()
Specified by:
run in interface java.lang.Runnable

completedRequest

public void completedRequest(org.apache.http.client.methods.AbortableHttpRequest request)


Copyright © 2012 Atlassian. All Rights Reserved.