org.apache.hadoop.security
Class SaslPropertiesResolver

java.lang.Object
  extended by org.apache.hadoop.security.SaslPropertiesResolver
All Implemented Interfaces:
Configurable

public class SaslPropertiesResolver
extends Object
implements Configurable

Provides SaslProperties to be used for a connection. The default implementation is to read the values from configuration. This class can be overridden to provide custom SaslProperties. The custom class can be specified via configuration.


Constructor Summary
SaslPropertiesResolver()
           
 
Method Summary
 Map<String,String> getClientProperties(InetAddress serverAddress)
          Identify the Sasl Properties to be used for a connection with a server.
 Configuration getConf()
          Return the configuration used by this object.
protected  Map<String,String> getDefaultProperties()
          The default Sasl Properties read from the configuration
static SaslPropertiesResolver getInstance(Configuration conf)
          Returns an instance of SaslPropertiesResolver.
 Map<String,String> getServerProperties(InetAddress clientAddress)
          Identify the Sasl Properties to be used for a connection with a client.
 void setConf(Configuration conf)
          Set the configuration to be used by this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaslPropertiesResolver

public SaslPropertiesResolver()
Method Detail

getInstance

public static SaslPropertiesResolver getInstance(Configuration conf)
Returns an instance of SaslPropertiesResolver. Looks up the configuration to see if there is custom class specified. Constructs the instance by passing the configuration directly to the constructor to achieve thread safety using final fields.

Parameters:
conf -
Returns:
SaslPropertiesResolver

setConf

public void setConf(Configuration conf)
Description copied from interface: Configurable
Set the configuration to be used by this object.

Specified by:
setConf in interface Configurable

getConf

public Configuration getConf()
Description copied from interface: Configurable
Return the configuration used by this object.

Specified by:
getConf in interface Configurable

getDefaultProperties

protected Map<String,String> getDefaultProperties()
The default Sasl Properties read from the configuration

Returns:
sasl Properties

getServerProperties

public Map<String,String> getServerProperties(InetAddress clientAddress)
Identify the Sasl Properties to be used for a connection with a client.

Parameters:
clientAddress - client's address
Returns:
the sasl properties to be used for the connection.

getClientProperties

public Map<String,String> getClientProperties(InetAddress serverAddress)
Identify the Sasl Properties to be used for a connection with a server.

Parameters:
serverAddress - server's address
Returns:
the sasl properties to be used for the connection.


Copyright © 2014 Apache Software Foundation. All Rights Reserved.