当前位置: 首页>>代码示例>>Java>>正文


Java SaslInputStream类代码示例

本文整理汇总了Java中org.apache.hadoop.security.SaslInputStream的典型用法代码示例。如果您正苦于以下问题:Java SaslInputStream类的具体用法?Java SaslInputStream怎么用?Java SaslInputStream使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SaslInputStream类属于org.apache.hadoop.security包,在下文中一共展示了SaslInputStream类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createStreamPair

import org.apache.hadoop.security.SaslInputStream; //导入依赖的package包/类
/**
 * Return some input/output streams that may henceforth have their
 * communication encrypted, depending on the negotiated quality of protection.
 *
 * @param out output stream to wrap
 * @param in input stream to wrap
 * @return IOStreamPair wrapping the streams
 */
public IOStreamPair createStreamPair(DataOutputStream out,
    DataInputStream in) {
  if (saslClient != null) {
    return new IOStreamPair(
        new SaslInputStream(in, saslClient),
        new SaslOutputStream(out, saslClient));
  } else {
    return new IOStreamPair(
        new SaslInputStream(in, saslServer),
        new SaslOutputStream(out, saslServer));
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:SaslParticipant.java

示例2: createEncryptedStreamPair

import org.apache.hadoop.security.SaslInputStream; //导入依赖的package包/类
private IOStreamPair createEncryptedStreamPair(
    DataOutputStream out, DataInputStream in) {
  if (saslClient != null) {
    return new IOStreamPair(
        new SaslInputStream(in, saslClient),
        new SaslOutputStream(out, saslClient));
  } else {
    return new IOStreamPair(
        new SaslInputStream(in, saslServer),
        new SaslOutputStream(out, saslServer));
  }
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:13,代码来源:DataTransferEncryptor.java

示例3: createEncryptedStreamPair

import org.apache.hadoop.security.SaslInputStream; //导入依赖的package包/类
private IOStreamPair createEncryptedStreamPair(DataOutputStream out,
    DataInputStream in) {
  if (saslClient != null) {
    return new IOStreamPair(new SaslInputStream(in, saslClient),
        new SaslOutputStream(out, saslClient));
  } else {
    return new IOStreamPair(new SaslInputStream(in, saslServer),
        new SaslOutputStream(out, saslServer));
  }
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:11,代码来源:DataTransferEncryptor.java

示例4: getInputStream

import org.apache.hadoop.security.SaslInputStream; //导入依赖的package包/类
/**
 * Get a SASL wrapped InputStream. Can be called only after saslConnect() has
 * been called.
 *
 * @param in
 *          the InputStream to wrap
 * @return a SASL wrapped InputStream
 * @throws IOException
 */
public InputStream getInputStream(InputStream in) throws IOException {
  if (!saslClient.isComplete()) {
    throw new IOException("Sasl authentication exchange hasn't completed yet");
  }
  return new SaslInputStream(in, saslClient);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:16,代码来源:HBaseSaslRpcClient.java

示例5: getInputStream

import org.apache.hadoop.security.SaslInputStream; //导入依赖的package包/类
/**
 * Get a SASL wrapped InputStream. Can be called only after saslConnect() has
 * been called.
 * 
 * @param in
 *          the InputStream to wrap
 * @return a SASL wrapped InputStream
 * @throws IOException
 */
public InputStream getInputStream(InputStream in) throws IOException {
  if (!saslClient.isComplete()) {
    throw new IOException("Sasl authentication exchange hasn't completed yet");
  }
  return new SaslInputStream(in, saslClient);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:16,代码来源:HBaseSaslRpcClient.java


注:本文中的org.apache.hadoop.security.SaslInputStream类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。