Class ProtonEngineNoOpSaslDriver
- java.lang.Object
-
- org.apache.qpid.protonj2.engine.impl.ProtonEngineNoOpSaslDriver
-
- All Implemented Interfaces:
EngineSaslDriver
public final class ProtonEngineNoOpSaslDriver extends Object implements EngineSaslDriver
A Default No-Op SASL context that is used to provide the engine with a stub when no SASL is configured for the operating engine.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.qpid.protonj2.engine.EngineSaslDriver
EngineSaslDriver.SaslState
-
-
Field Summary
Fields Modifier and Type Field Description static ProtonEngineNoOpSaslDriver
INSTANCE
Default singleton instance of the No-Op SASL engine driver.static int
MIN_MAX_SASL_FRAME_SIZE
AMQP specified default value for maximum SASL frame size.
-
Constructor Summary
Constructors Constructor Description ProtonEngineNoOpSaslDriver()
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Field Detail
-
INSTANCE
public static final ProtonEngineNoOpSaslDriver INSTANCE
Default singleton instance of the No-Op SASL engine driver.
-
MIN_MAX_SASL_FRAME_SIZE
public static final int MIN_MAX_SASL_FRAME_SIZE
AMQP specified default value for maximum SASL frame size.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSaslState
public EngineSaslDriver.SaslState getSaslState()
Description copied from interface:EngineSaslDriver
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.- Specified by:
getSaslState
in interfaceEngineSaslDriver
- Returns:
- the current state of SASL Authentication.
-
getSaslOutcome
public SaslOutcome getSaslOutcome()
Description copied from interface:EngineSaslDriver
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.
- Specified by:
getSaslOutcome
in interfaceEngineSaslDriver
- Returns:
- the SASL outcome code that results from authentication
-
getMaxFrameSize
public int getMaxFrameSize()
- Specified by:
getMaxFrameSize
in interfaceEngineSaslDriver
- Returns:
- the currently configured max frame size allowed for SASL frames.
-
setMaxFrameSize
public void setMaxFrameSize(int maxFrameSize)
Description copied from interface:EngineSaslDriver
Set the maximum frame size the remote can send before an error is indicated.- Specified by:
setMaxFrameSize
in interfaceEngineSaslDriver
- Parameters:
maxFrameSize
- The maximum allowed frame size from the remote sender.
-
client
public SaslClientContext client()
Description copied from interface:EngineSaslDriver
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.- Specified by:
client
in interfaceEngineSaslDriver
- Returns:
- the SASL client context.
-
server
public SaslServerContext server()
Description copied from interface:EngineSaslDriver
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.- Specified by:
server
in interfaceEngineSaslDriver
- Returns:
- the SASL server context.
-
-