org.apache.qpid.proton.engine.impl
Class SaslImpl

java.lang.Object
  extended by org.apache.qpid.proton.engine.impl.SaslImpl
All Implemented Interfaces:
SaslFrameBody.SaslFrameBodyHandler<Void>, Sasl

public class SaslImpl
extends Object
implements Sasl, SaslFrameBody.SaslFrameBodyHandler<Void>


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.qpid.proton.engine.Sasl
Sasl.SaslOutcome, Sasl.SaslState
 
Field Summary
static byte[] HEADER
           
static byte SASL_FRAME_TYPE
           
 
Fields inherited from interface org.apache.qpid.proton.engine.Sasl
END_OF_STREAM, PN_SASL_AUTH, PN_SASL_NONE, PN_SASL_OK, PN_SASL_PERM, PN_SASL_SYS, PN_SASL_TEMP
 
Constructor Summary
SaslImpl()
           
 
Method Summary
 void client()
           
 void done(Sasl.SaslOutcome outcome)
           
 Symbol getChosenMechanism()
           
 Sasl.SaslOutcome getOutcome()
           
 String[] getRemoteMechanisms()
           
 Sasl.SaslState getState()
           
 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)
           
 int input(byte[] bytes, int offset, int size)
           
 int output(byte[] bytes, int offset, int size)
           
 int pending()
           
 void plain(String username, String password)
           
protected  int process(WritableBuffer buffer)
           
 int recv(byte[] bytes, int offset, int size)
           
 int send(byte[] bytes, int offset, int size)
           
 void server()
           
 void setMechanism(Symbol mechanism)
           
 void setMechanisms(String[] mechanisms)
           
 void setResponse(Binary initialResponse)
           
 TransportWrapper wrap(TransportInput input, TransportOutput output)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SASL_FRAME_TYPE

public static final byte SASL_FRAME_TYPE
See Also:
Constant Field Values

HEADER

public static final byte[] HEADER
Constructor Detail

SaslImpl

public SaslImpl()
Method Detail

input

public final int input(byte[] bytes,
                       int offset,
                       int size)
Specified by:
input in interface Sasl

output

public final int output(byte[] bytes,
                        int offset,
                        int size)
Specified by:
output in interface Sasl

process

protected int process(WritableBuffer buffer)

recv

public final int recv(byte[] bytes,
                      int offset,
                      int size)
Specified by:
recv in interface Sasl

send

public final int send(byte[] bytes,
                      int offset,
                      int size)
Specified by:
send in interface Sasl

pending

public int pending()
Specified by:
pending in interface Sasl

getState

public Sasl.SaslState getState()
Specified by:
getState in interface Sasl

setMechanisms

public void setMechanisms(String[] mechanisms)
Specified by:
setMechanisms in interface Sasl

getRemoteMechanisms

public String[] getRemoteMechanisms()
Specified by:
getRemoteMechanisms in interface Sasl

setMechanism

public void setMechanism(Symbol mechanism)

getChosenMechanism

public Symbol getChosenMechanism()

setResponse

public void setResponse(Binary initialResponse)

handleInit

public void handleInit(SaslInit saslInit,
                       Binary payload,
                       Void context)
Specified by:
handleInit in interface SaslFrameBody.SaslFrameBodyHandler<Void>

handleResponse

public void handleResponse(SaslResponse saslResponse,
                           Binary payload,
                           Void context)
Specified by:
handleResponse in interface SaslFrameBody.SaslFrameBodyHandler<Void>

done

public void done(Sasl.SaslOutcome outcome)
Specified by:
done in interface Sasl

handleMechanisms

public void handleMechanisms(SaslMechanisms saslMechanisms,
                             Binary payload,
                             Void context)
Specified by:
handleMechanisms in interface SaslFrameBody.SaslFrameBodyHandler<Void>

handleChallenge

public void handleChallenge(SaslChallenge saslChallenge,
                            Binary payload,
                            Void context)
Specified by:
handleChallenge in interface SaslFrameBody.SaslFrameBodyHandler<Void>

handleOutcome

public void handleOutcome(SaslOutcome saslOutcome,
                          Binary payload,
                          Void context)
Specified by:
handleOutcome in interface SaslFrameBody.SaslFrameBodyHandler<Void>

plain

public void plain(String username,
                  String password)
Specified by:
plain in interface Sasl

getOutcome

public Sasl.SaslOutcome getOutcome()
Specified by:
getOutcome in interface Sasl

client

public void client()
Specified by:
client in interface Sasl

server

public void server()
Specified by:
server in interface Sasl

wrap

public TransportWrapper wrap(TransportInput input,
                             TransportOutput output)


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.