org.apache.http.auth.AuthScope.getPort()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(98)

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

AuthScope.getPort介绍

暂无

代码示例

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

/** 
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  if (authscope == null) {
    throw new IllegalArgumentException("Scope may not be null");
  }
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
}

代码示例来源:origin: org.eclipse.aether/aether-transport-http

private CredentialsProvider getDelegate( AuthScope authScope )
{
  if ( proxy.getPort() == authScope.getPort() && proxy.getHostName().equalsIgnoreCase( authScope.getHost() ) )
  {
    return proxyCredentialsProvider;
  }
  return serverCredentialsProvider;
}

代码示例来源:origin: com.machinepublishers/jbrowserdriver

/**
 * {@inheritDoc}
 */
@Override
public Credentials getCredentials(AuthScope authScope) {
 synchronized (lock) {
  return proxies.get(authScope.getHost() + ":" + authScope.getPort());
 }
}

代码示例来源:origin: Unidata/thredds

@Deprecated
static public HTTPSession newSession(AuthScope scope) throws HTTPException
{
  HttpHost hh = new HttpHost(scope.getHost(), scope.getPort(), null);
  return new HTTPSession(hh);
}

代码示例来源:origin: HtmlUnit/htmlunit

private void writeObject(final ObjectOutputStream stream) throws IOException {
  stream.writeObject(authScope_.getHost());
  stream.writeInt(authScope_.getPort());
  stream.writeObject(authScope_.getRealm());
  stream.writeObject(authScope_.getScheme());
}

代码示例来源:origin: net.sourceforge.htmlunit/htmlunit

private void writeObject(final ObjectOutputStream stream) throws IOException {
  stream.writeObject(authScope_.getHost());
  stream.writeInt(authScope_.getPort());
  stream.writeObject(authScope_.getRealm());
  stream.writeObject(authScope_.getScheme());
}
private void readObject(final ObjectInputStream stream) throws IOException, ClassNotFoundException {

代码示例来源:origin: edu.ucar/httpservices

static public void serializeScope(AuthScope scope, ObjectOutputStream oos)
  throws IOException
{
  oos.writeObject(scope.getHost());
  oos.writeInt(scope.getPort());
  oos.writeObject(scope.getRealm());
  oos.writeObject(scope.getScheme());
}

代码示例来源:origin: org.ferris/ferris-net

/**
 * Basic setter
 */
private void setAuthScope(AuthScope authScope) {
  this.authScope = authScope;
  log.info("Host=\"" + authScope.getHost() + "\"");
  log.info("Port=\"" + authScope.getPort() + "\"");
  log.info("Realm=\"" + authScope.getRealm() + "\"");
  log.info("Scheme=\"" + authScope.getScheme() + "\"");
}

代码示例来源:origin: Unidata/thredds

static HttpHost authscopeToHost(AuthScope scope)
{
  return new HttpHost(scope.getHost(), scope.getPort(), scope.getScheme());
}

代码示例来源:origin: MobiVM/robovm

/** 
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  if (authscope == null) {
    throw new IllegalArgumentException("Scope may not be null");
  }
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
}

代码示例来源:origin: com.gluonhq/robovm-rt

/** 
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  if (authscope == null) {
    throw new IllegalArgumentException("Scope may not be null");
  }
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
}

代码示例来源:origin: Unidata/thredds

public Credentials
getCredentials(AuthScope scope) //AuthScheme authscheme, String host, int port, boolean isproxy)
{
  UsernamePasswordCredentials creds = new UsernamePasswordCredentials(username, password);
  logger.info("TestCredentials.getCredentials called: creds=|{}| host={} port={}}",
      creds.toString(), scope.getHost(), scope.getPort());
  this.counter++;
  return creds;
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient

/**
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  Args.notNull(authscope, "Scope");
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
}

代码示例来源:origin: Unidata/thredds

public Credentials
getCredentials(AuthScope scope) //AuthScheme authscheme, String host, int port, boolean isproxy)
{
  UsernamePasswordCredentials creds = new UsernamePasswordCredentials(username, password);
  System.err.printf("TestCredentials.getCredentials called: creds=|%s| host=%s port=%d%n",
      creds.toString(), scope.getHost(), scope.getPort());
  return creds;
}

代码示例来源:origin: com.hynnet/httpclient

/**
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  Args.notNull(authscope, "Scope");
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
  this.origin = authscope.getOrigin();
}

代码示例来源:origin: ibinti/bugvm

/**
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  Args.notNull(authscope, "Scope");
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
  this.origin = authscope.getOrigin();
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  Args.notNull(authscope, "Scope");
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
  this.origin = authscope.getOrigin();
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  Args.notNull(authscope, "Scope");
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
  this.origin = authscope.getOrigin();
}

代码示例来源:origin: Nextdoor/bender

/**
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  Args.notNull(authscope, "Scope");
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
  this.origin = authscope.getOrigin();
}

代码示例来源:origin: adolfAn/FBReader_AS

public int hashCode() {
    if (myScope == null) {
      return 0;
    }
    return
      myScope.getPort() +
      ComparisonUtil.hashCode(myScope.getHost()) +
      ComparisonUtil.hashCode(myScope.getScheme()) +
      ComparisonUtil.hashCode(myScope.getRealm());
  }
}

相关文章