Class MqttCapacityException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.mqtt4j.hato.MqttException
org.mqtt4j.hato.MqttCapacityException
- All Implemented Interfaces:
Serializable
A bounded resource has no available capacity.
As an operation's failure, this means the operation was not admitted; the rejection
does not close an existing connection, and limit() names the limit that refused it. An
observation that fails this way, such as one returned by Subscription.unsubscribe(),
leaves the request it observes in place.
As a Disconnection.cause(), or the cause of MqttConnectException or
MqttConnectionLostException, this means overload ended the affected connection, and
limit() is empty; ClientStats.overloads() counts such endings by cause.
Pending operations fail with that connection's termination.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMqttCapacityException(String message) Describes an overload that ended a connection.MqttCapacityException(String message, CapacityLimit limit) Describes an operation thatlimitrefused. -
Method Summary
Modifier and TypeMethodDescriptionlimit()Returns the limit that refused the operation, or empty when overload ended a connection.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MqttCapacityException
Describes an overload that ended a connection.- Parameters:
message- the detail message
-
MqttCapacityException
Describes an operation thatlimitrefused.- Parameters:
message- the detail messagelimit- the limit that refused the operation
-
-
Method Details
-
limit
Returns the limit that refused the operation, or empty when overload ended a connection.- Returns:
- the limit that refused the operation, or empty when overload ended a connection
-