.class public Lorg/apache/http/impl/client/DefaultConnectionKeepAliveStrategy; .super Ljava/lang/Object; .source "DefaultConnectionKeepAliveStrategy.java" # interfaces .implements Lorg/apache/http/conn/ConnectionKeepAliveStrategy; # static fields .field public static final INSTANCE:Lorg/apache/http/impl/client/DefaultConnectionKeepAliveStrategy; # direct methods .method static constructor ()V .registers 1 .line 52 new-instance v0, Lorg/apache/http/impl/client/DefaultConnectionKeepAliveStrategy; invoke-direct {v0}, Lorg/apache/http/impl/client/DefaultConnectionKeepAliveStrategy;->()V sput-object v0, Lorg/apache/http/impl/client/DefaultConnectionKeepAliveStrategy;->INSTANCE:Lorg/apache/http/impl/client/DefaultConnectionKeepAliveStrategy; return-void .end method .method public constructor ()V .registers 1 .line 50 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method # virtual methods .method public getKeepAliveDuration(Lorg/apache/http/HttpResponse;Lorg/apache/http/protocol/HttpContext;)J .registers 5 .line 56 const-string p2, "HTTP response" invoke-static {p1, p2}, Lorg/apache/http/util/Args;->notNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; .line 57 new-instance p2, Lorg/apache/http/message/BasicHeaderElementIterator; const-string v0, "Keep-Alive" invoke-interface {p1, v0}, Lorg/apache/http/HttpResponse;->headerIterator(Ljava/lang/String;)Lorg/apache/http/HeaderIterator; move-result-object p1 invoke-direct {p2, p1}, Lorg/apache/http/message/BasicHeaderElementIterator;->(Lorg/apache/http/HeaderIterator;)V .line 59 :catch_10 :cond_10 invoke-interface {p2}, Lorg/apache/http/HeaderElementIterator;->hasNext()Z move-result p1 if-eqz p1, :cond_34 .line 60 invoke-interface {p2}, Lorg/apache/http/HeaderElementIterator;->nextElement()Lorg/apache/http/HeaderElement; move-result-object p1 .line 61 invoke-interface {p1}, Lorg/apache/http/HeaderElement;->getName()Ljava/lang/String; move-result-object v0 .line 62 invoke-interface {p1}, Lorg/apache/http/HeaderElement;->getValue()Ljava/lang/String; move-result-object p1 if-eqz p1, :cond_10 .line 63 const-string v1, "timeout" invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z move-result v0 if-eqz v0, :cond_10 .line 65 :try_start_2c invoke-static {p1}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J move-result-wide p1 :try_end_30 .catch Ljava/lang/NumberFormatException; {:try_start_2c .. :try_end_30} :catch_10 const-wide/16 v0, 0x3e8 mul-long/2addr p1, v0 return-wide p1 :cond_34 const-wide/16 p1, -0x1 return-wide p1 .end method