Class DuplicateSubscribeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.servicetalk.concurrent.internal.RejectedSubscribeException
io.servicetalk.concurrent.internal.DuplicateSubscribeException
- All Implemented Interfaces:
RejectedSubscribeError
,Serializable
Used in scenarios where a subscribe to an asynchronous source is subscribed to, but there is already a subscriber
and the source doesn't support multiple subscribers.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDuplicateSubscribeException
(Object existingSubscriber, Object attemptedSubscriber) Create a new instance.DuplicateSubscribeException
(Object existingSubscriber, Object attemptedSubscriber, String message) Create a new instance. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DuplicateSubscribeException
Create a new instance.- Parameters:
existingSubscriber
- The existing subscriber, or state that prevented the subscribe from completing.attemptedSubscriber
- The subscriber which failed to subscribe.
-
DuplicateSubscribeException
public DuplicateSubscribeException(@Nullable Object existingSubscriber, Object attemptedSubscriber, String message) Create a new instance.- Parameters:
existingSubscriber
- The existing subscriber, or state that prevented the subscribe from completing.attemptedSubscriber
- The subscriber which failed to subscribe.message
- An optional message clarifying the situation.
-