java.net.HttpURLConnection.setAllowUserInteraction()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(203)

本文整理了Java中java.net.HttpURLConnection.setAllowUserInteraction()方法的一些代码示例,展示了HttpURLConnection.setAllowUserInteraction()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpURLConnection.setAllowUserInteraction()方法的具体详情如下:
包路径:java.net.HttpURLConnection
类名称:HttpURLConnection
方法名:setAllowUserInteraction

HttpURLConnection.setAllowUserInteraction介绍

暂无

代码示例

代码示例来源:origin: square/okhttp

@Override public void setAllowUserInteraction(boolean newValue) {
 delegate.setAllowUserInteraction(newValue);
}

代码示例来源:origin: prestodb/presto

@Override public void setAllowUserInteraction(boolean newValue) {
 delegate.setAllowUserInteraction(newValue);
}

代码示例来源:origin: speedment/speedment

con.setAllowUserInteraction(false);
con.setDoOutput(true);

代码示例来源:origin: rmtheis/android-ocr

HttpURLConnection urlConnection = null;
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setAllowUserInteraction(false);
urlConnection.setInstanceFollowRedirects(true);
urlConnection.setRequestMethod("GET");

代码示例来源:origin: speedment/speedment

conn.setAllowUserInteraction(false);

代码示例来源:origin: wildfly/wildfly

connection.setAllowUserInteraction(false);
connection.setConnectTimeout(10000);
connection.setReadTimeout(10000);

代码示例来源:origin: mttkay/signpost

protected HttpRequest createRequest(String endpointUrl) throws MalformedURLException,
    IOException {
  HttpURLConnection connection = (HttpURLConnection) new URL(endpointUrl).openConnection();
  connection.setRequestMethod("POST");
  connection.setAllowUserInteraction(false);
  connection.setRequestProperty("Content-Length", "0");
  return new HttpURLConnectionRequestAdapter(connection);
}

代码示例来源:origin: briandilley/jsonrpc4j

/**
 * Prepares a connection to the server.
 *
 * @param extraHeaders extra headers to add to the request
 * @return the unopened connection
 * @throws IOException
 */
private HttpURLConnection prepareConnection(Map<String, String> extraHeaders) throws IOException {
  
  // create URLConnection
  HttpURLConnection connection = (HttpURLConnection) serviceUrl.openConnection(connectionProxy);
  connection.setConnectTimeout(connectionTimeoutMillis);
  connection.setReadTimeout(readTimeoutMillis);
  connection.setAllowUserInteraction(false);
  connection.setDefaultUseCaches(false);
  connection.setDoInput(true);
  connection.setDoOutput(true);
  connection.setUseCaches(false);
  connection.setInstanceFollowRedirects(true);
  connection.setRequestMethod("POST");
  
  setupSsl(connection);
  addHeaders(extraHeaders, connection);
  
  return connection;
}

代码示例来源:origin: org.codelibs/jcifs

@Override
public void setAllowUserInteraction ( boolean allowUserInteraction ) {
  this.connection.setAllowUserInteraction(allowUserInteraction);
  this.allowUserInteraction = allowUserInteraction;
}

代码示例来源:origin: AgNO3/jcifs-ng

@Override
public void setAllowUserInteraction ( boolean allowUserInteraction ) {
  this.connection.setAllowUserInteraction(allowUserInteraction);
  this.allowUserInteraction = allowUserInteraction;
}

代码示例来源:origin: com.jaeksoft/jcifs-krb5-jdk7

public void setAllowUserInteraction(boolean allowUserInteraction) {
  connection.setAllowUserInteraction(allowUserInteraction);
  this.allowUserInteraction = allowUserInteraction;
}

代码示例来源:origin: EvoSuite/evosuite

@Override
public void setAllowUserInteraction(boolean allowuserinteraction) {
  super.setAllowUserInteraction(allowuserinteraction);
}

代码示例来源:origin: jcifs/jcifs

public void setAllowUserInteraction(boolean allowUserInteraction) {
  connection.setAllowUserInteraction(allowUserInteraction);
  this.allowUserInteraction = allowUserInteraction;
}

代码示例来源:origin: apiman/apiman

@Override public void setAllowUserInteraction(boolean newValue) {
 delegate.setAllowUserInteraction(newValue);
}

代码示例来源:origin: census-instrumentation/opencensus-java

/** quick http client that allows no-dependency try at getting instance data. */
private static InputStream openStream(URI uri) throws IOException {
 HttpURLConnection connection = HttpURLConnection.class.cast(uri.toURL().openConnection());
 connection.setConnectTimeout(1000 * 2);
 connection.setReadTimeout(1000 * 2);
 connection.setAllowUserInteraction(false);
 connection.setInstanceFollowRedirects(false);
 return connection.getInputStream();
}

代码示例来源:origin: org.ballerinalang/ballerina-integration-test-utils

private static HttpURLConnection getURLConnection(String requestUrl, int readTimeout) throws IOException {
  URL url = new URL(requestUrl);
  HttpURLConnection conn = (HttpURLConnection) url.openConnection();
  conn.setDoOutput(true);
  conn.setReadTimeout(readTimeout);
  conn.setConnectTimeout(15000);
  conn.setDoInput(true);
  conn.setUseCaches(false);
  conn.setAllowUserInteraction(false);
  return conn;
}

代码示例来源:origin: io.opencensus/opencensus-contrib-monitored-resource-util

/** quick http client that allows no-dependency try at getting instance data. */
private static InputStream openStream(URI uri) throws IOException {
 HttpURLConnection connection = HttpURLConnection.class.cast(uri.toURL().openConnection());
 connection.setConnectTimeout(1000 * 2);
 connection.setReadTimeout(1000 * 2);
 connection.setAllowUserInteraction(false);
 connection.setInstanceFollowRedirects(false);
 return connection.getInputStream();
}

代码示例来源:origin: oauth.signpost/signpost-core

protected HttpRequest createRequest(String endpointUrl) throws MalformedURLException,
    IOException {
  HttpURLConnection connection = (HttpURLConnection) new URL(endpointUrl).openConnection();
  connection.setRequestMethod("POST");
  connection.setAllowUserInteraction(false);
  connection.setRequestProperty("Content-Length", "0");
  return new HttpURLConnectionRequestAdapter(connection);
}

代码示例来源:origin: org.hawkular.apm/hawkular-apm-client-api

public HttpURLConnection getConnectionForRequest(String tenantId, URL url, String method) throws IOException {
  HttpURLConnection connection = (HttpURLConnection) url.openConnection();
  connection.setRequestMethod(method);
  connection.setDoOutput(true);
  connection.setUseCaches(false);
  connection.setAllowUserInteraction(false);
  addHeaders(connection, tenantId);
  return connection;
}

代码示例来源:origin: org.codehaus.httpcache4j.resolvers/resolvers-net-urlconnection

private void configureConnection(HttpURLConnection connection) {
  if (configuration.getConnectTimeout() > 0) {
    connection.setConnectTimeout(configuration.getConnectTimeout());
  }
  if (configuration.getReadTimeout() > 0) {
    connection.setReadTimeout(configuration.getReadTimeout());
  }
  connection.setAllowUserInteraction(false);
}

相关文章

HttpURLConnection类方法