public interface Sasl
Modifier and Type | Interface and Description |
---|---|
static class |
Sasl.SaslOutcome |
static class |
Sasl.SaslState |
Modifier and Type | Field and Description |
---|---|
static Sasl.SaslOutcome |
PN_SASL_AUTH |
static Sasl.SaslOutcome |
PN_SASL_NONE |
static Sasl.SaslOutcome |
PN_SASL_OK |
static Sasl.SaslOutcome |
PN_SASL_PERM |
static Sasl.SaslOutcome |
PN_SASL_SKIPPED |
static Sasl.SaslOutcome |
PN_SASL_SYS |
static Sasl.SaslOutcome |
PN_SASL_TEMP |
Modifier and Type | Method and Description |
---|---|
void |
allowSkip(boolean allowSkip)
Set whether servers may accept incoming connections
that skip the SASL layer negotiation.
|
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.
|
java.lang.String |
getHostname()
Retrieve the hostname indicated by the client when sending its SaslInit.
|
Sasl.SaslOutcome |
getOutcome()
Retrieve the outcome of SASL negotiation.
|
java.lang.String[] |
getRemoteMechanisms()
Retrieve the list of SASL mechanisms provided by the remote.
|
Sasl.SaslState |
getState()
Access the current state of the layer.
|
int |
pending()
Determine the size of the bytes available via recv().
|
void |
plain(java.lang.String username,
java.lang.String password)
Configure the SASL layer to use the "PLAIN" mechanism.
|
int |
recv(byte[] bytes,
int offset,
int size)
Read challenge/response/additional data sent from the peer.
|
int |
send(byte[] bytes,
int offset,
int size)
Send challenge/response/additional data to the peer.
|
void |
server() |
void |
setListener(SaslListener saslListener)
Adds a listener to receive notice of frames having arrived.
|
void |
setMechanisms(java.lang.String... mechanisms)
Set the acceptable SASL mechanisms for the layer.
|
void |
setRemoteHostname(java.lang.String hostname)
Set the remote hostname to indicate the host being connected to when
sending a SaslInit to the server.
|
static final Sasl.SaslOutcome PN_SASL_NONE
static final Sasl.SaslOutcome PN_SASL_OK
static final Sasl.SaslOutcome PN_SASL_AUTH
static final Sasl.SaslOutcome PN_SASL_SYS
static final Sasl.SaslOutcome PN_SASL_PERM
static final Sasl.SaslOutcome PN_SASL_TEMP
static final Sasl.SaslOutcome PN_SASL_SKIPPED
Sasl.SaslState getState()
void setMechanisms(java.lang.String... mechanisms)
mechanisms
- a list of acceptable SASL mechanismsjava.lang.String[] getRemoteMechanisms()
void setRemoteHostname(java.lang.String hostname)
java.lang.String getHostname()
int pending()
int recv(byte[] bytes, int offset, int size)
bytes
- written with up to size bytes of inbound data.offset
- the offset in the array to begin writing atsize
- maximum number of bytes that bytes can accept.int send(byte[] bytes, int offset, int size)
bytes
- The challenge/response data.offset
- the point within the array at which the data starts atsize
- The number of data octets in bytes.void done(Sasl.SaslOutcome outcome)
outcome
- the outcome of the SASL negotiationvoid plain(java.lang.String username, java.lang.String password)
username
- credential for the PLAIN authentication
mechanismpassword
- credential for the PLAIN authentication
mechanismSasl.SaslOutcome getOutcome()
void client()
void server()
void allowSkip(boolean allowSkip)
void setListener(SaslListener saslListener)