Example usage for javax.security.sasl SaslClient getNegotiatedProperty

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

Introduction

In this page you can find the example usage for javax.security.sasl SaslClient 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 SaslClient <br>
 * Note: if the specified InputStream or SaslClient is null, a
 * NullPointerException may be thrown later when they are used.
 * /*from   ww w.  jav a2 s  .co m*/
 * @param inStream
 *          the InputStream to be processed
 * @param saslClient
 *          an initialized SaslClient object
 */
public SaslInputStream(InputStream inStream, SaslClient saslClient) {
    this.inStream = new DataInputStream(inStream);
    this.saslServer = null;
    this.saslClient = saslClient;
    String qop = (String) saslClient.getNegotiatedProperty(Sasl.QOP);
    this.useWrap = qop != null && !"auth".equalsIgnoreCase(qop);
}