Example usage for javax.security.sasl SaslServer getNegotiatedProperty

List of usage examples for javax.security.sasl SaslServer getNegotiatedProperty

Introduction

In this page you can find the example usage for javax.security.sasl SaslServer getNegotiatedProperty.

Prototype


public abstract Object getNegotiatedProperty(String propName);

Source Link

Document

Retrieves the negotiated property.

Usage

From source file:org.apache.hadoop.security.SaslInputStream.java

/**
 * Constructs a SASLInputStream from an InputStream and a SaslServer <br>
 * Note: if the specified InputStream or SaslServer is null, a
 * NullPointerException may be thrown later when they are used.
 * // w  ww. ja  v a 2s.  c  o  m
 * @param inStream
 *          the InputStream to be processed
 * @param saslServer
 *          an initialized SaslServer object
 */
public SaslInputStream(InputStream inStream, SaslServer saslServer) {
    this.inStream = new DataInputStream(inStream);
    this.saslServer = saslServer;
    this.saslClient = null;
    String qop = (String) saslServer.getNegotiatedProperty(Sasl.QOP);
    this.useWrap = qop != null && !"auth".equalsIgnoreCase(qop);
}