Java 类org.jivesoftware.smack.proxy.ProxyInfo 实例源码

项目:EIM    文件:ConnectionConfiguration.java   
private void init(String host, int port, String serviceName, ProxyInfo proxy) {
      this.host = host;
      this.port = port;
      this.serviceName = serviceName;
      this.proxy = proxy;

      // Build the default path to the cacert truststore file. By default we are
      // going to use the file located in $JREHOME/lib/security/cacerts.
      String javaHome = System.getProperty("java.home");
      StringBuilder buffer = new StringBuilder();
      buffer.append(javaHome).append(File.separator).append("lib");
      buffer.append(File.separator).append("security");
      buffer.append(File.separator).append("cacerts");
      truststorePath = buffer.toString();
      // Set the default store type
      truststoreType = "jks";
      // Set the default password of the cacert file that is "changeit"
      truststorePassword = "changeit";
      keystorePath = System.getProperty("javax.net.ssl.keyStore");
      keystoreType = "jks";
      pkcs11Library = "pkcs11.config";

//Setting the SocketFactory according to proxy supplied
      socketFactory = proxy.getSocketFactory();
  }
项目:androidpn_enhanced_client    文件:ConnectionConfiguration.java   
private void init(String host, int port, String serviceName, ProxyInfo proxy) {
      this.host = host;
      this.port = port;
      this.serviceName = serviceName;
      this.proxy = proxy;

      // Build the default path to the cacert truststore file. By default we are
      // going to use the file located in $JREHOME/lib/security/cacerts.
      String javaHome = System.getProperty("java.home");
      StringBuilder buffer = new StringBuilder();
      buffer.append(javaHome).append(File.separator).append("lib");
      buffer.append(File.separator).append("security");
      buffer.append(File.separator).append("cacerts");
      truststorePath = buffer.toString();
      // Set the default store type
      truststoreType = "jks";
      // Set the default password of the cacert file that is "changeit"
      truststorePassword = "changeit";
      keystorePath = System.getProperty("javax.net.ssl.keyStore");
      keystoreType = "jks";
      pkcs11Library = "pkcs11.config";

//Setting the SocketFactory according to proxy supplied
      socketFactory = proxy.getSocketFactory();
  }
项目:androidPN-client.    文件:ConnectionConfiguration.java   
protected void init(String serviceName, ProxyInfo proxy) {
      this.serviceName = serviceName;
      this.proxy = proxy;

      // Build the default path to the cacert truststore file. By default we are
      // going to use the file located in $JREHOME/lib/security/cacerts.
      String javaHome = System.getProperty("java.home");
      StringBuilder buffer = new StringBuilder();
      buffer.append(javaHome).append(File.separator).append("lib");
      buffer.append(File.separator).append("security");
      buffer.append(File.separator).append("cacerts");
      truststorePath = buffer.toString();
      // Set the default store type
      truststoreType = "jks";
      // Set the default password of the cacert file that is "changeit"
      truststorePassword = "changeit";
      keystorePath = System.getProperty("javax.net.ssl.keyStore");
      keystoreType = "jks";
      pkcs11Library = "pkcs11.config";

//Setting the SocketFactory according to proxy supplied
      socketFactory = proxy.getSocketFactory();
  }
项目:AndroidPNClient    文件:ConnectionConfiguration.java   
private void init(String host, int port, String serviceName, ProxyInfo proxy) {
      this.host = host;
      this.port = port;
      this.serviceName = serviceName;
      this.proxy = proxy;

      // Build the default path to the cacert truststore file. By default we are
      // going to use the file located in $JREHOME/lib/security/cacerts.
      String javaHome = System.getProperty("java.home");
      StringBuilder buffer = new StringBuilder();
      buffer.append(javaHome).append(File.separator).append("lib");
      buffer.append(File.separator).append("security");
      buffer.append(File.separator).append("cacerts");
      truststorePath = buffer.toString();
      // Set the default store type
      truststoreType = "jks";
      // Set the default password of the cacert file that is "changeit"
      truststorePassword = "changeit";
      keystorePath = System.getProperty("javax.net.ssl.keyStore");
      keystoreType = "jks";
      pkcs11Library = "pkcs11.config";

//Setting the SocketFactory according to proxy supplied
      socketFactory = proxy.getSocketFactory();
  }
项目:java-bells    文件:ConnectionConfiguration.java   
protected void init(String serviceName, ProxyInfo proxy) {
      this.serviceName = serviceName;
      this.proxy = proxy;

      // Build the default path to the cacert truststore file. By default we are
      // going to use the file located in $JREHOME/lib/security/cacerts.
      String javaHome = System.getProperty("java.home");
      StringBuilder buffer = new StringBuilder();
      buffer.append(javaHome).append(File.separator).append("lib");
      buffer.append(File.separator).append("security");
      buffer.append(File.separator).append("cacerts");
      truststorePath = buffer.toString();
      // Set the default store type
      truststoreType = "jks";
      // Set the default password of the cacert file that is "changeit"
      truststorePassword = "changeit";
      keystorePath = System.getProperty("javax.net.ssl.keyStore");
      keystoreType = "jks";
      pkcs11Library = "pkcs11.config";

//Setting the SocketFactory according to proxy supplied
      socketFactory = proxy.getSocketFactory();
  }
项目:telegraph    文件:ConnectionConfiguration.java   
protected void init(String host, int port, String serviceName, ProxyInfo proxy) {
      this.host = host;
      this.port = port;
      this.serviceName = serviceName;
      this.proxy = proxy;

      // Build the default path to the cacert truststore file. By default we are
      // going to use the file located in $JREHOME/lib/security/cacerts.
      String javaHome = System.getProperty("java.home");
      StringBuilder buffer = new StringBuilder();
      buffer.append(javaHome).append(File.separator).append("lib");
      buffer.append(File.separator).append("security");
      buffer.append(File.separator).append("cacerts");
      truststorePath = buffer.toString();
      // Set the default store type
      truststoreType = "jks";
      // Set the default password of the cacert file that is "changeit"
      truststorePassword = "changeit";
      keystorePath = System.getProperty("javax.net.ssl.keyStore");
      keystoreType = "jks";
      pkcs11Library = "pkcs11.config";

//Setting the SocketFactory according to proxy supplied
      socketFactory = proxy.getSocketFactory();
  }
项目:NewCommunication-Android    文件:ConnectionConfiguration.java   
private void init(String host, int port, String serviceName, ProxyInfo proxy) {
      this.host = host;
      this.port = port;
      this.serviceName = serviceName;
      this.proxy = proxy;

      // Build the default path to the cacert truststore file. By default we are
      // going to use the file located in $JREHOME/lib/security/cacerts.
      String javaHome = System.getProperty("java.home");
      StringBuilder buffer = new StringBuilder();
      buffer.append(javaHome).append(File.separator).append("lib");
      buffer.append(File.separator).append("security");
      buffer.append(File.separator).append("cacerts");
      truststorePath = buffer.toString();
      // Set the default store type
      truststoreType = "jks";
      // Set the default password of the cacert file that is "changeit"
      truststorePassword = "changeit";
      keystorePath = System.getProperty("javax.net.ssl.keyStore");
      keystoreType = "jks";
      pkcs11Library = "pkcs11.config";

//Setting the SocketFactory according to proxy supplied
      socketFactory = proxy.getSocketFactory();
  }
项目:asmack-mini    文件:ConnectionConfiguration.java   
protected void init(String serviceName, ProxyInfo proxy) {
      this.serviceName = serviceName;
      this.proxy = proxy;

      // Build the default path to the cacert truststore file. By default we are
      // going to use the file located in $JREHOME/lib/security/cacerts.
      String javaHome = System.getProperty("java.home");
      StringBuilder buffer = new StringBuilder();
      buffer.append(javaHome).append(File.separator).append("lib");
      buffer.append(File.separator).append("security");
      buffer.append(File.separator).append("cacerts");
      truststorePath = buffer.toString();
      // Set the default store type
      truststoreType = "jks";
      // Set the default password of the cacert file that is "changeit"
      truststorePassword = "changeit";
      keystorePath = System.getProperty("javax.net.ssl.keyStore");
      keystoreType = "jks";
      pkcs11Library = "pkcs11.config";

//Setting the SocketFactory according to proxy supplied
      socketFactory = proxy.getSocketFactory();
  }
项目:xmppsupport_v2    文件:ConnectionConfiguration.java   
protected void init(String host, int port, String serviceName,
        ProxyInfo proxy) {
    this.host = host;
    this.port = port;
    this.serviceName = serviceName;
    this.proxy = proxy;

    // Build the default path to the cacert truststore file. By default we
    // are
    // going to use the file located in $JREHOME/lib/security/cacerts.
    String javaHome = System.getProperty("java.home");
    StringBuilder buffer = new StringBuilder();
    buffer.append(javaHome).append(File.separator).append("lib");
    buffer.append(File.separator).append("security");
    buffer.append(File.separator).append("cacerts");
    truststorePath = buffer.toString();
    // Set the default store type
    truststoreType = "jks";
    // Set the default password of the cacert file that is "changeit"
    truststorePassword = "changeit";
    keystorePath = System.getProperty("javax.net.ssl.keyStore");
    keystoreType = "jks";
    pkcs11Library = "pkcs11.config";

    // Setting the SocketFactory according to proxy supplied
    socketFactory = proxy.getSocketFactory();
}
项目:jamppa    文件:ConnectionConfiguration.java   
protected void init(String serviceName, ProxyInfo proxy) {
    this.serviceName = serviceName;
    this.proxy = proxy;

    keystorePath = System.getProperty("javax.net.ssl.keyStore");
    keystoreType = "jks";
    pkcs11Library = "pkcs11.config";

    // Setting the SocketFactory according to proxy supplied
    socketFactory = proxy.getSocketFactory();
}
项目:Beem    文件:BeemService.java   
/**
    * Get the save proxy configuration.
    *
    * @return the proxy configuration
    */
   private ProxyInfo getProxyConfiguration() {
boolean useProxy = mSettings.getBoolean(BeemApplication.PROXY_USE_KEY, false);
if (useProxy) {
    String stype = mSettings.getString(BeemApplication.PROXY_TYPE_KEY, "HTTP");
    String phost = mSettings.getString(BeemApplication.PROXY_SERVER_KEY, "");
    String puser = mSettings.getString(BeemApplication.PROXY_USERNAME_KEY, "");
    String ppass = mSettings.getString(BeemApplication.PROXY_PASSWORD_KEY, "");
    int pport = Integer.parseInt(mSettings.getString(BeemApplication.PROXY_PORT_KEY, "1080"));
    ProxyInfo.ProxyType type = ProxyType.valueOf(stype);
    return new ProxyInfo(type, phost, pport, puser, ppass);
} else {
    return ProxyInfo.forNoProxy();
}
   }
项目:beem-fork-xmpp    文件:BeemService.java   
/**
    * Get the save proxy configuration.
    *
    * @return the proxy configuration
    */
   private ProxyInfo getProxyConfiguration() {
boolean useProxy = mSettings.getBoolean(BeemApplication.PROXY_USE_KEY, false);
if (useProxy) {
    String stype = mSettings.getString(BeemApplication.PROXY_TYPE_KEY, "HTTP");
    String phost = mSettings.getString(BeemApplication.PROXY_SERVER_KEY, "");
    String puser = mSettings.getString(BeemApplication.PROXY_USERNAME_KEY, "");
    String ppass = mSettings.getString(BeemApplication.PROXY_PASSWORD_KEY, "");
    int pport = Integer.parseInt(mSettings.getString(BeemApplication.PROXY_PORT_KEY, "1080"));
    ProxyInfo.ProxyType type = ProxyType.valueOf(stype);
    return new ProxyInfo(type, phost, pport, puser, ppass);
} else {
    return ProxyInfo.forNoProxy();
}
   }
项目:Smack    文件:BOSHConfiguration.java   
public boolean isProxyEnabled() {
    return (proxy != null && proxy.getProxyType() != ProxyInfo.ProxyType.NONE);
}
项目:Smack    文件:BOSHConfiguration.java   
public ProxyInfo getProxyInfo() {
    return proxy;
}
项目:androidpn_enhanced_client    文件:BOSHConfiguration.java   
public boolean isProxyEnabled() {
    return (proxy != null && proxy.getProxyType() != ProxyInfo.ProxyType.NONE);
}
项目:androidpn_enhanced_client    文件:BOSHConfiguration.java   
public ProxyInfo getProxyInfo() {
    return proxy;
}
项目:androidPN-client.    文件:BOSHConfiguration.java   
public boolean isProxyEnabled() {
    return (proxy != null && proxy.getProxyType() != ProxyInfo.ProxyType.NONE);
}
项目:androidPN-client.    文件:BOSHConfiguration.java   
public ProxyInfo getProxyInfo() {
    return proxy;
}
项目:xmppsupport_v2    文件:BOSHConfiguration.java   
public boolean isProxyEnabled() {
    return (proxy != null && proxy.getProxyType() != ProxyInfo.ProxyType.NONE);
}
项目:xmppsupport_v2    文件:BOSHConfiguration.java   
public ProxyInfo getProxyInfo() {
    return proxy;
}
项目:AndroidPNClient    文件:BOSHConfiguration.java   
public boolean isProxyEnabled() {
    return (proxy != null && proxy.getProxyType() != ProxyInfo.ProxyType.NONE);
}
项目:AndroidPNClient    文件:BOSHConfiguration.java   
public ProxyInfo getProxyInfo() {
    return proxy;
}
项目:telegraph    文件:BOSHConfiguration.java   
public boolean isProxyEnabled() {
    return (proxy != null && proxy.getProxyType() != ProxyInfo.ProxyType.NONE);
}
项目:telegraph    文件:BOSHConfiguration.java   
public ProxyInfo getProxyInfo() {
    return proxy;
}
项目:NewCommunication-Android    文件:BOSHConfiguration.java   
public boolean isProxyEnabled() {
    return (proxy != null && proxy.getProxyType() != ProxyInfo.ProxyType.NONE);
}
项目:NewCommunication-Android    文件:BOSHConfiguration.java   
public ProxyInfo getProxyInfo() {
    return proxy;
}
项目:EIM    文件:ConnectionConfiguration.java   
/**
  * Creates a new ConnectionConfiguration for the specified service name.
  * A DNS SRV lookup will be performed to find out the actual host address
  * and port to use for the connection.
  *
  * @param serviceName the name of the service provided by an XMPP server.
  */
 public ConnectionConfiguration(String serviceName) {
     // Perform DNS lookup to get host and port to use
     DNSUtil.HostAddress address = DNSUtil.resolveXMPPDomain(serviceName);
     init(address.getHost(), address.getPort(), serviceName, 
ProxyInfo.forDefaultProxy());
 }
项目:androidpn_enhanced_client    文件:ConnectionConfiguration.java   
/**
  * Creates a new ConnectionConfiguration for the specified service name.
  * A DNS SRV lookup will be performed to find out the actual host address
  * and port to use for the connection.
  *
  * @param serviceName the name of the service provided by an XMPP server.
  */
 public ConnectionConfiguration(String serviceName) {
     // Perform DNS lookup to get host and port to use
     DNSUtil.HostAddress address = DNSUtil.resolveXMPPDomain(serviceName);
     init(address.getHost(), address.getPort(), serviceName, 
ProxyInfo.forDefaultProxy());
 }
项目:xmppsupport_v2    文件:ConnectionConfiguration.java   
/**
 * Creates a new ConnectionConfiguration for the specified service name. A
 * DNS SRV lookup will be performed to find out the actual host address and
 * port to use for the connection.
 * 
 * @param serviceName
 *            the name of the service provided by an XMPP server.
 */
public ConnectionConfiguration(String serviceName) {
    // Perform DNS lookup to get host and port to use
    DNSUtil.HostAddress address = DNSUtil.resolveXMPPDomain(serviceName);
    init(address.getHost(), address.getPort(), serviceName,
            ProxyInfo.forDefaultProxy());
}
项目:AndroidPNClient    文件:ConnectionConfiguration.java   
/**
  * Creates a new ConnectionConfiguration for the specified service name.
  * A DNS SRV lookup will be performed to find out the actual host address
  * and port to use for the connection.
  *
  * @param serviceName the name of the service provided by an XMPP server.
  */
 public ConnectionConfiguration(String serviceName) {
     // Perform DNS lookup to get host and port to use
     DNSUtil.HostAddress address = DNSUtil.resolveXMPPDomain(serviceName);
     init(address.getHost(), address.getPort(), serviceName, 
ProxyInfo.forDefaultProxy());
 }
项目:telegraph    文件:ConnectionConfiguration.java   
/**
  * Creates a new ConnectionConfiguration for the specified service name.
  * A DNS SRV lookup will be performed to find out the actual host address
  * and port to use for the connection.
  *
  * @param serviceName the name of the service provided by an XMPP server.
  */
 public ConnectionConfiguration(String serviceName) {
     // Perform DNS lookup to get host and port to use
     DNSUtil.HostAddress address = DNSUtil.resolveXMPPDomain(serviceName);
     init(address.getHost(), address.getPort(), serviceName, 
ProxyInfo.forDefaultProxy());
 }
项目:NewCommunication-Android    文件:ConnectionConfiguration.java   
/**
  * Creates a new ConnectionConfiguration for the specified service name.
  * A DNS SRV lookup will be performed to find out the actual host address
  * and port to use for the connection.
  *
  * @param serviceName the name of the service provided by an XMPP server.
  */
 public ConnectionConfiguration(String serviceName) {
     // Perform DNS lookup to get host and port to use
     DNSUtil.HostAddress address = DNSUtil.resolveXMPPDomain(serviceName);
     init(address.getHost(), address.getPort(), serviceName, 
ProxyInfo.forDefaultProxy());
 }
项目:Smack    文件:ConnectionConfiguration.java   
/**
 * Set the information about the Proxy used for the connection.
 *
 * @param proxyInfo the Proxy information.
 * @return a reference to this builder.
 */
public B setProxyInfo(ProxyInfo proxyInfo) {
    this.proxy = proxyInfo;
    return getThis();
}
项目:EIM    文件:ConnectionConfiguration.java   
/**
 * Creates a new ConnectionConfiguration for the specified service name 
 * with specified proxy.
 * A DNS SRV lookup will be performed to find out the actual host address
 * and port to use for the connection.
 *
 * @param serviceName the name of the service provided by an XMPP server.
 * @param proxy the proxy through which XMPP is to be connected
 */
public ConnectionConfiguration(String serviceName,ProxyInfo proxy) {
    // Perform DNS lookup to get host and port to use
    DNSUtil.HostAddress address = DNSUtil.resolveXMPPDomain(serviceName);
    init(address.getHost(), address.getPort(), serviceName, proxy);
}