- Type Parameters:
T- the type of the
Method SummaryModifier and TypeMethodDescription
cancel()Hard cancel - nothing is sent to the subscriber but subscription is considered as canceled.
voidMark the subscriber holder as closed.
get()Get the stored subscriber.
isClosed()Check if this subscriber holder has been closed.
booleanRegister a new subscriber.
registerRegister a new subscriber.
In case the subscriber registration fails (e.g. the holder already holds a previously registered subscriber or the holder has been
closed), the newly registered subscriber is notified about the error by invoking it's
subscriber- subscriber to be registered in the holder.
trueif the subscriber was successfully registered,
closeMark the subscriber holder as closed.
Invoking this method will ensure that any new attempts to
registera new subscriber would fail.
In case this holder holds a subscriber and the close method has not been invoked yet, the supplied
completionHandleris invoked using the value of the registered subscriber as an input parameter. This means that the supplied completion handler is guaranteed to be invoked at most once.
completionHandler- completion handler to be invoked to process any completion logic on a registered subscriber, provided there is a registered subscriber and it has not been previously passed to a completion handler (e.g. in a previous invocation of this method).
cancelpublic void cancel()Hard cancel - nothing is sent to the subscriber but subscription is considered as canceled.
getGet the stored subscriber.
This method blocks indefinitely until a subscriber is registered or the holder has been closed.
isClosedpublic boolean isClosed()Check if this subscriber holder has been closed.
trueif the holder is closed,