jenkins.plugins.asynchttpclient
Class AHC

java.lang.Object
  extended by hudson.model.Descriptor<AHC>
      extended by jenkins.plugins.asynchttpclient.AHC
All Implemented Interfaces:
hudson.model.Describable<AHC>, hudson.model.Saveable

@Extension
public class AHC
extends hudson.model.Descriptor<AHC>
implements hudson.model.Describable<AHC>

Provides a global shared AsyncHttpClient instance, for use from the master, configured with the master's proxy settings. This shared instance will be gracefully closed when Jenkins is terminating, and will be recycled if the proxy settings change or if somebody closes it my accident. The recommendation is to not to cache the instance longer than a user's request.

Since:
1.7.8

Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.Descriptor
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType
 
Field Summary
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
AHC()
          Our constructor.
 
Method Summary
 AHC getDescriptor()
          
 String getDisplayName()
          
static com.ning.http.client.AsyncHttpClient instance()
          Returns the shared AsyncHttpClient instance.
 
Methods inherited from class hudson.model.Descriptor
calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, getCheckUrl, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getPropertyType, getPropertyType, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AHC

public AHC()
Our constructor.

Method Detail

instance

public static com.ning.http.client.AsyncHttpClient instance()
Returns the shared AsyncHttpClient instance.

Returns:
the shared AsyncHttpClient instance.
Throws:
IllegalStateException - if executed on a slave JVM.

getDescriptor

public AHC getDescriptor()

Specified by:
getDescriptor in interface hudson.model.Describable<AHC>

getDisplayName

public String getDisplayName()

Specified by:
getDisplayName in class hudson.model.Descriptor<AHC>


Copyright © 2012. All Rights Reserved.