org.apache.zookeeper.client
Class ZooKeeperSaslClient

java.lang.Object
  extended by org.apache.zookeeper.client.ZooKeeperSaslClient

public class ZooKeeperSaslClient
extends Object

This class manages SASL authentication for the client. It allows ClientCnxn to authenticate using SASL with a Zookeeper server.


Nested Class Summary
static class ZooKeeperSaslClient.ClientCallbackHandler
           
static class ZooKeeperSaslClient.SaslState
           
static class ZooKeeperSaslClient.ServerSaslResponseCallback
           
 
Constructor Summary
ZooKeeperSaslClient(ClientCnxn cnxn, String serverPrincipal)
           
 
Method Summary
 byte[] createSaslToken()
           
 ZooKeeperSaslClient.SaslState getSaslState()
           
 void initialize()
           
 boolean isComplete()
           
 void queueSaslPacket()
           
 void queueSaslPacket(byte[] saslToken)
           
 boolean readyToSendSaslAuthEvent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZooKeeperSaslClient

public ZooKeeperSaslClient(ClientCnxn cnxn,
                           String serverPrincipal)
                    throws LoginException
Throws:
LoginException
Method Detail

getSaslState

public ZooKeeperSaslClient.SaslState getSaslState()

isComplete

public boolean isComplete()

createSaslToken

public byte[] createSaslToken()
                       throws SaslException
Throws:
SaslException

queueSaslPacket

public void queueSaslPacket(byte[] saslToken)

queueSaslPacket

public void queueSaslPacket()
                     throws SaslException
Throws:
SaslException

readyToSendSaslAuthEvent

public boolean readyToSendSaslAuthEvent()

initialize

public void initialize()
                throws SaslException
Throws:
SaslException


Copyright © 2011 The Apache Software Foundation