public class SaslImpl extends Object implements Sasl, SaslFrameBody.SaslFrameBodyHandler<Void>
Sasl.SaslOutcome, Sasl.SaslState
Modifier and Type | Field and Description |
---|---|
static byte |
SASL_FRAME_TYPE |
PN_SASL_AUTH, PN_SASL_NONE, PN_SASL_OK, PN_SASL_PERM, PN_SASL_SYS, PN_SASL_TEMP
Modifier and Type | Method and Description |
---|---|
void |
client() |
void |
done(Sasl.SaslOutcome outcome)
Set the outcome of SASL negotiation
Used by the server to set the result of the negotiation process.
|
Symbol |
getChosenMechanism() |
Sasl.SaslOutcome |
getOutcome()
Retrieve the outcome of SASL negotiation.
|
String[] |
getRemoteMechanisms()
Retrieve the list of SASL mechanisms provided by the remote.
|
Sasl.SaslState |
getState()
Access the current state of the layer.
|
void |
handle(SaslFrameBody frameBody,
Binary payload) |
void |
handleChallenge(SaslChallenge saslChallenge,
Binary payload,
Void context) |
void |
handleInit(SaslInit saslInit,
Binary payload,
Void context) |
void |
handleMechanisms(SaslMechanisms saslMechanisms,
Binary payload,
Void context) |
void |
handleOutcome(SaslOutcome saslOutcome,
Binary payload,
Void context) |
void |
handleResponse(SaslResponse saslResponse,
Binary payload,
Void context) |
boolean |
isDone() |
int |
pending()
Determine the size of the bytes available via recv().
|
void |
plain(String username,
String password)
Configure the SASL layer to use the "PLAIN" mechanism.
|
int |
recv(byte[] bytes,
int offset,
int size)
Read challenge/response data sent from the peer.
|
int |
send(byte[] bytes,
int offset,
int size)
Send challenge or response data to the peer.
|
void |
server() |
void |
setMechanism(Symbol mechanism) |
void |
setMechanisms(String... mechanisms)
Set the acceptable SASL mechanisms for the layer.
|
void |
setResponse(Binary initialResponse) |
String |
toString() |
TransportWrapper |
wrap(TransportInput input,
TransportOutput output) |
public static final byte SASL_FRAME_TYPE
public boolean isDone()
public final int recv(byte[] bytes, int offset, int size)
Sasl
public final int send(byte[] bytes, int offset, int size)
Sasl
public int pending()
Sasl
public Sasl.SaslState getState()
Sasl
public void setMechanisms(String... mechanisms)
Sasl
setMechanisms
in interface Sasl
mechanisms
- a list of acceptable SASL mechanismspublic String[] getRemoteMechanisms()
Sasl
getRemoteMechanisms
in interface Sasl
public void setMechanism(Symbol mechanism)
public Symbol getChosenMechanism()
public void setResponse(Binary initialResponse)
public void handle(SaslFrameBody frameBody, Binary payload)
public void handleInit(SaslInit saslInit, Binary payload, Void context)
handleInit
in interface SaslFrameBody.SaslFrameBodyHandler<Void>
public void handleResponse(SaslResponse saslResponse, Binary payload, Void context)
handleResponse
in interface SaslFrameBody.SaslFrameBodyHandler<Void>
public void done(Sasl.SaslOutcome outcome)
Sasl
public void handleMechanisms(SaslMechanisms saslMechanisms, Binary payload, Void context)
handleMechanisms
in interface SaslFrameBody.SaslFrameBodyHandler<Void>
public void handleChallenge(SaslChallenge saslChallenge, Binary payload, Void context)
handleChallenge
in interface SaslFrameBody.SaslFrameBodyHandler<Void>
public void handleOutcome(SaslOutcome saslOutcome, Binary payload, Void context)
handleOutcome
in interface SaslFrameBody.SaslFrameBodyHandler<Void>
public void plain(String username, String password)
Sasl
public Sasl.SaslOutcome getOutcome()
Sasl
getOutcome
in interface Sasl
public TransportWrapper wrap(TransportInput input, TransportOutput output)
Copyright © 2014 The Apache Software Foundation. All rights reserved.