public class NonblockingSaslHandler
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
NonblockingSaslHandler.Phase |
| Constructor and Description |
|---|
NonblockingSaslHandler(java.nio.channels.SelectionKey selectionKey,
TNonblockingTransport underlyingTransport,
TSaslServerFactory saslServerFactory,
TSaslProcessorFactory processorFactory,
TProtocolFactory inputProtocolFactory,
TProtocolFactory outputProtocolFactory,
TServerEventHandler eventHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Release all the resources managed by this state machine (connection, selection and sasl server).
|
NonblockingSaslHandler.Phase |
getCurrentPhase()
Get current phase of the state machine.
|
NonblockingSaslHandler.Phase |
getNextPhase()
Get next phase of the state machine.
|
javax.security.sasl.SaslServer |
getSaslServer() |
TNonblockingTransport |
getUnderlyingTransport() |
void |
handleRead()
When current phase is intrested in read selection, calling this will run the current phase and
its following phases if the following ones are interested to read, until there is nothing
available in the underlying transport.
|
void |
handleWrite()
Similiar to handleRead.
|
boolean |
isCurrentPhaseDone() |
void |
runCurrentPhase()
Run state machine.
|
void |
stepToNextPhase()
When current phase is finished, it's expected to call this method first before running the
state machine again.
|
public NonblockingSaslHandler(java.nio.channels.SelectionKey selectionKey,
TNonblockingTransport underlyingTransport,
TSaslServerFactory saslServerFactory,
TSaslProcessorFactory processorFactory,
TProtocolFactory inputProtocolFactory,
TProtocolFactory outputProtocolFactory,
TServerEventHandler eventHandler)
public NonblockingSaslHandler.Phase getCurrentPhase()
public NonblockingSaslHandler.Phase getNextPhase()
public TNonblockingTransport getUnderlyingTransport()
public javax.security.sasl.SaslServer getSaslServer()
public boolean isCurrentPhaseDone()
public void runCurrentPhase()
java.lang.IllegalStateException - if current state is already done.public void handleRead()
java.lang.IllegalStateException - if is called in an irrelevant phase.public void handleWrite()
java.lang.IllegalStateException - if it is called in an irrelevant phase.public void stepToNextPhase()
java.lang.IllegalArgumentException - if current phase is not yet done.public void close()