Class ProxyFactoryBean

java.lang.Object
org.springframework.http.client.support.ProxyFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<Proxy>, org.springframework.beans.factory.InitializingBean

public class ProxyFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<Proxy>, org.springframework.beans.factory.InitializingBean
FactoryBean that creates a java.net.Proxy.
Since:
3.0.4
Author:
Arjen Poutsma
See Also:
  • Constructor Details

    • ProxyFactoryBean

      public ProxyFactoryBean()
  • Method Details

    • setType

      public void setType(Proxy.Type type)
      Set the proxy type.

      Defaults to Proxy.Type.HTTP.

    • setHostname

      public void setHostname(String hostname)
      Set the proxy host name.
    • setPort

      public void setPort(int port)
      Set the proxy port.
    • afterPropertiesSet

      public void afterPropertiesSet() throws IllegalArgumentException
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      IllegalArgumentException
    • getObject

      @Nullable public Proxy getObject()
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<Proxy>
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<Proxy>
    • isSingleton

      public boolean isSingleton()
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<Proxy>