Package org.apache.qpid.protonj2.engine
Interface EngineSaslDriver
-
- All Known Implementing Classes:
ProtonEngineNoOpSaslDriver
public interface EngineSaslDriver
Driver for the Engine that exposes SASL state and configuration.When configured for SASL authentication the SASL driver provides a view of the current state of the authentication and allows for configuration of the SASL layer prior to the start of the authentication process. Once authentication is complete the driver provides a means of determining the outcome of process.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
EngineSaslDriver.SaslState
The SASL driver state used to determine at what point the current SASL negotiation process is currently in.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SaslClientContext
client()
Configure thisEngineSaslDriver
to operate in client mode and return the associatedSaslClientContext
instance that should be used to complete the SASL negotiation with the server end.int
getMaxFrameSize()
SaslOutcome
getSaslOutcome()
Provides a low level outcome value for the SASL authentication process.EngineSaslDriver.SaslState
getSaslState()
Returns a SaslState that indicates the current operating state of the SASL negotiation process or conversely if no SASL layer is configured this method should return the disabled state.SaslServerContext
server()
Configure thisEngineSaslDriver
to operate in server mode and return the associatedSaslServerContext
instance that should be used to complete the SASL negotiation with the client end.void
setMaxFrameSize(int maxFrameSize)
Set the maximum frame size the remote can send before an error is indicated.
-
-
-
Method Detail
-
client
SaslClientContext client()
Configure thisEngineSaslDriver
to operate in client mode and return the associatedSaslClientContext
instance that should be used to complete the SASL negotiation with the server end.- Returns:
- the SASL client context.
- Throws:
IllegalStateException
- if the engine is already in server mode or the engine has not been configure with SASL support.
-
server
SaslServerContext server()
Configure thisEngineSaslDriver
to operate in server mode and return the associatedSaslServerContext
instance that should be used to complete the SASL negotiation with the client end.- Returns:
- the SASL server context.
- Throws:
IllegalStateException
- if the engine is already in client mode or the engine has not been configure with SASL support.
-
getSaslState
EngineSaslDriver.SaslState getSaslState()
Returns a SaslState that indicates the current operating state of the SASL negotiation process or conversely if no SASL layer is configured this method should return the disabled state. This method must never return a null result.- Returns:
- the current state of SASL Authentication.
-
getSaslOutcome
SaslOutcome getSaslOutcome()
Provides a low level outcome value for the SASL authentication process.If the SASL exchange is ongoing or the SASL layer was skipped because a particular engine configuration allows such behavior then this method should return null to indicate no SASL outcome is available.
- Returns:
- the SASL outcome code that results from authentication
-
getMaxFrameSize
int getMaxFrameSize()
- Returns:
- the currently configured max frame size allowed for SASL frames.
-
setMaxFrameSize
void setMaxFrameSize(int maxFrameSize)
Set the maximum frame size the remote can send before an error is indicated.- Parameters:
maxFrameSize
- The maximum allowed frame size from the remote sender.
-
-