@InterfaceAudience.LimitedPrivate(value={"HDFS","MapReduce"}) @InterfaceStability.Evolving public class SaslRpcClient extends Object
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
SaslRpcClient(UserGroupInformation ugi,
Class<?> protocol,
InetSocketAddress serverAddr,
Configuration conf)
Create a SaslRpcClient that can be used by a RPC client to negotiate
SASL authentication with a RPC server
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Release resources used by wrapped saslClient
|
SaslRpcServer.AuthMethod |
getAuthMethod() |
InputStream |
getInputStream(InputStream in)
Get SASL wrapped InputStream if SASL QoP requires unwrapping,
otherwise return original stream.
|
Object |
getNegotiatedProperty(String key) |
OutputStream |
getOutputStream(OutputStream out)
Get SASL wrapped OutputStream if SASL QoP requires wrapping,
otherwise return original stream.
|
SaslRpcServer.AuthMethod |
saslConnect(InputStream inS,
OutputStream outS)
Do client side SASL authentication with server via the given InputStream
and OutputStream
|
public SaslRpcClient(UserGroupInformation ugi, Class<?> protocol, InetSocketAddress serverAddr, Configuration conf)
ugi
- - connecting userprotocol
- - RPC protocolserverAddr
- - InetSocketAddress of remote serverconf
- - Configuration@InterfaceAudience.Private public Object getNegotiatedProperty(String key)
@InterfaceAudience.Private public SaslRpcServer.AuthMethod getAuthMethod()
public SaslRpcServer.AuthMethod saslConnect(InputStream inS, OutputStream outS) throws IOException
inS
- InputStream to useoutS
- OutputStream to useIOException
public InputStream getInputStream(InputStream in) throws IOException
in
- - InputStream used to make the connectionIOException
public OutputStream getOutputStream(OutputStream out) throws IOException
in
- - InputStream used to make the connectionIOException
public void dispose() throws SaslException
SaslException
Copyright © 2013 Apache Software Foundation. All rights reserved.