Top Description Inners Fields Constructors Methods
reactor.core.publisher

pack-priv final Class FluxPublish<T>

extends ConnectableFlux<T>
implements Scannable
Class Inheritance
All Implemented Interfaces
reactor.core.Scannable
Type Parameters
<T>
the value type
Imports
java.util.Objects, .Queue, java.util.concurrent.CancellationException, java.util.concurrent.atomic.AtomicLongFieldUpdater, .AtomicReferenceFieldUpdater, java.util.function.Consumer, .Supplier, java.util.stream.Stream, org.reactivestreams.Subscription, reactor.core.CoreSubscriber, .Disposable, .Exceptions, .Fuseable, .Scannable, reactor.util.annotation.Nullable, reactor.util.context.Context

A connectable publisher which shares an underlying source and dispatches source values to subscribers in a backpressure-aware manner.
See Also
Reactive-Streams-Commons

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv abstract static class

Field Summary

Modifier and TypeField and Description
pack-priv volatile FluxPublish.PublishSubscriber<T>
pack-priv static final AtomicReferenceFieldUpdater<FluxPublish<T>, FluxPublish.PublishSubscriber<T>>
pack-priv final int
prefetch

The size of the prefetch buffer.

pack-priv final Supplier<? extends Queue<T>>
pack-priv final boolean
resetUponSourceTermination

Whether to prepare for a reconnect after the source terminates.

pack-priv final Flux<? extends T>
source

The source observable.

Inherited from reactor.core.publisher.ConnectableFlux:
NOOP_DISCONNECT

Constructor Summary

AccessConstructor and Description
pack-priv
FluxPublish(Flux<? extends T> source, int prefetch, Supplier<? extends Queue<T>> queueSupplier, boolean resetUponSourceTermination)

Method Summary

Modifier and TypeMethod and Description
public void
connect(Consumer<? super Disposable>
the callback is called with a Disposable instance that can be called to disconnect the source, even synchronously.
cancelSupport
)

Implements abstract reactor.core.publisher.ConnectableFlux.connect.

Connects this ConnectableFlux to its source and sends a Disposable to a callback that can be used for disconnecting.
public int
getPrefetch()

Overrides reactor.core.publisher.Flux.getPrefetch.

The prefetch configuration of the Flux
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
public void
subscribe(CoreSubscriber<? super T>
the Subscriber interested into the published sequence
actual
)

Implements abstract reactor.core.publisher.Flux.subscribe.

Implements reactor.core.CorePublisher.subscribe.

An internal Publisher#subscribe(Subscriber) that will bypass Hooks#onLastOperator(Function) pointcut.
Inherited from reactor.core.publisher.ConnectableFlux:
autoConnectautoConnectautoConnectconnecthiderefCountrefCountrefCountrefCount

Field Detail

connectionback to summary
pack-priv volatile FluxPublish.PublishSubscriber<T> connection
CONNECTIONback to summary
pack-priv static final AtomicReferenceFieldUpdater<FluxPublish<T>, FluxPublish.PublishSubscriber<T>> CONNECTION
Annotations
@SuppressWarnings:rawtypes
prefetchback to summary
pack-priv final int prefetch

The size of the prefetch buffer.

queueSupplierback to summary
pack-priv final Supplier<? extends Queue<T>> queueSupplier
resetUponSourceTerminationback to summary
pack-priv final boolean resetUponSourceTermination

Whether to prepare for a reconnect after the source terminates.

sourceback to summary
pack-priv final Flux<? extends T> source

The source observable.

Constructor Detail

FluxPublishback to summary
pack-priv FluxPublish(Flux<? extends T> source, int prefetch, Supplier<? extends Queue<T>> queueSupplier, boolean resetUponSourceTermination)

Method Detail

connectback to summary
public void connect(Consumer<? super Disposable> cancelSupport)

Implements abstract reactor.core.publisher.ConnectableFlux.connect.

Doc from reactor.core.publisher.ConnectableFlux.connect.

Connects this ConnectableFlux to its source and sends a Disposable to a callback that can be used for disconnecting.

The call should be idempotent in respect of connecting the first and subsequent times. In addition, the disconnection should be tied to a particular connection (so two different connections can't disconnect the other).

Parameters
cancelSupport:Consumer<? super Disposable>

the callback is called with a Disposable instance that can be called to disconnect the source, even synchronously.

Annotations
@Override
getPrefetchback to summary
public int getPrefetch()

Overrides reactor.core.publisher.Flux.getPrefetch.

Doc from reactor.core.publisher.Flux.getPrefetch.

The prefetch configuration of the Flux

Returns:int

the prefetch configuration of the Flux, -1 if unspecified

Annotations
@Override
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Implements reactor.core.Scannable.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Override
@Nullable
subscribeback to summary
public void subscribe(CoreSubscriber<? super T> actual)

Implements abstract reactor.core.publisher.Flux.subscribe.

Implements reactor.core.CorePublisher.subscribe.

Doc from reactor.core.publisher.Flux.subscribe.

An internal Publisher#subscribe(Subscriber) that will bypass Hooks#onLastOperator(Function) pointcut.

In addition to behave as expected by Publisher#subscribe(Subscriber) in a controlled manner, it supports direct subscribe-time Context passing.

Parameters
actual:CoreSubscriber<? super T>

the Subscriber interested into the published sequence

Annotations
@Override
reactor.core.publisher back to summary

pack-priv final Class FluxPublish.PublishInner<T>

extends FluxPublish.PubSubInner<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv FluxPublish.PublishSubscriber<T>
Inherited from reactor.core.publisher.FluxPublish.PubSubInner:
actualrequestedREQUESTED

Constructor Summary

AccessConstructor and Description
pack-priv
PublishInner(CoreSubscriber<? super T> actual)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Overrides reactor.core.publisher.FluxPublish.PubSubInner.scanUnsafe.

Overrides default reactor.core.publisher.InnerProducer.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
Inherited from reactor.core.publisher.FluxPublish.PubSubInner:
actualcancelisCancelledrequest

Field Detail

parentback to summary
pack-priv FluxPublish.PublishSubscriber<T> parent

Constructor Detail

PublishInnerback to summary
pack-priv PublishInner(CoreSubscriber<? super T> actual)

Method Detail

drainParentback to summary
pack-priv void drainParent()

Implements abstract reactor.core.publisher.FluxPublish.PubSubInner.drainParent.

Annotations
@Override
removeAndDrainParentback to summary
pack-priv void removeAndDrainParent()

Implements abstract reactor.core.publisher.FluxPublish.PubSubInner.removeAndDrainParent.

Annotations
@Override
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Overrides reactor.core.publisher.FluxPublish.PubSubInner.scanUnsafe.

Overrides default reactor.core.publisher.InnerProducer.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Override
@Nullable
reactor.core.publisher back to summary

pack-priv final Class FluxPublish.PublishSubscriber<T>

extends Object
implements InnerConsumer<T>, Disposable
Class Inheritance
All Implemented Interfaces
reactor.core.Disposable, reactor.core.publisher.InnerConsumer, reactor.core.Scannable, reactor.core.CoreSubscriber, org.reactivestreams.Subscriber

Field Summary

Modifier and TypeField and Description
pack-priv static final FluxPublish.PubSubInner<T>[]
pack-priv static final long
pack-priv static final long
pack-priv boolean
pack-priv volatile Throwable
pack-priv static final AtomicReferenceFieldUpdater<FluxPublish.PublishSubscriber<T>, Throwable>
pack-priv static final long
pack-priv static final FluxPublish.PubSubInner<T>[]
pack-priv final FluxPublish<T>
pack-priv final int
pack-priv Queue<T>
pack-priv Subscription
s

pack-priv int
pack-priv volatile long
pack-priv static final AtomicLongFieldUpdater<FluxPublish.PublishSubscriber<T>>
pack-priv volatile FluxPublish.PubSubInner<T>[]
pack-priv static final AtomicReferenceFieldUpdater<FluxPublish.PublishSubscriber<T>, FluxPublish.PubSubInner<T>[]>
pack-priv static final long
pack-priv static final FluxPublish.PubSubInner<T>[]
pack-priv static final long
pack-priv static final long

Constructor Summary

AccessConstructor and Description
pack-priv
PublishSubscriber(int prefetch, FluxPublish<T> parent)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
pack-priv static long
pack-priv static long
addWork(long state)

pack-priv static long
pack-priv boolean
checkTerminated(boolean d, boolean empty, T t)

pack-priv void
pack-priv static void
public Context
currentContext()

Overrides default reactor.core.CoreSubscriber.currentContext.

Request a Context from dependent components which can include downstream operators during subscribing or a terminal org.reactivestreams.Subscriber.
pack-priv void
disconnectAction(long previousState)

public void
dispose()

Implements reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.
pack-priv final void
drain(long expectedState)

pack-priv final void
pack-priv static boolean
hasWorkInProgress(long state)

public Stream<? extends Scannable>
inners()

Overrides default reactor.core.Scannable.inners.

Return a Stream of referenced inners (flatmap, multicast etc)
pack-priv static boolean
isCancelled(long state)

pack-priv static boolean
isConnected(long state)

public boolean
isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.
pack-priv static boolean
isFinalized(long state)

pack-priv static boolean
isSubscriptionSet(long state)

pack-priv boolean
pack-priv static boolean
isTerminated(long state)

pack-priv static long
pack-priv static long
pack-priv static long
pack-priv static long
pack-priv static long
pack-priv static long
markWorkDone(FluxPublish.PublishSubscriber<?> instance, long expectedState)

public void
onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Successful terminal state.
public void
onError(Throwable
the throwable signaled
t
)

Implements org.reactivestreams.Subscriber.onError.

Failed terminal state.
public void
onNext(T
the element signaled
t
)

Implements org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).
public void
onSubscribe(Subscription
the Subscription that allows requesting data via Subscription#request(long)
s
)

Implements reactor.core.CoreSubscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long).
public void
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
pack-priv FluxPublish.PubSubInner<T>[]
pack-priv boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CANCELLEDback to summary
pack-priv static final FluxPublish.PubSubInner<T>[] CANCELLED
Annotations
@SuppressWarnings:rawtypes
CANCELLED_FLAGback to summary
pack-priv static final long CANCELLED_FLAG
CONNECTED_FLAGback to summary
pack-priv static final long CONNECTED_FLAG
doneback to summary
pack-priv boolean done
errorback to summary
pack-priv volatile Throwable error
ERRORback to summary
pack-priv static final AtomicReferenceFieldUpdater<FluxPublish.PublishSubscriber<T>, Throwable> ERROR
Annotations
@SuppressWarnings:rawtypes
FINALIZED_FLAGback to summary
pack-priv static final long FINALIZED_FLAG
INITback to summary
pack-priv static final FluxPublish.PubSubInner<T>[] INIT
Annotations
@SuppressWarnings:rawtypes
parentback to summary
pack-priv final FluxPublish<T> parent
prefetchback to summary
pack-priv final int prefetch
queueback to summary
pack-priv Queue<T> queue
sback to summary
pack-priv Subscription s
sourceModeback to summary
pack-priv int sourceMode
stateback to summary
pack-priv volatile long state
STATEback to summary
pack-priv static final AtomicLongFieldUpdater<FluxPublish.PublishSubscriber<T>> STATE
Annotations
@SuppressWarnings:rawtypes
subscribersback to summary
pack-priv volatile FluxPublish.PubSubInner<T>[] subscribers
SUBSCRIBERSback to summary
pack-priv static final AtomicReferenceFieldUpdater<FluxPublish.PublishSubscriber<T>, FluxPublish.PubSubInner<T>[]> SUBSCRIBERS
Annotations
@SuppressWarnings:rawtypes
SUBSCRIPTION_SET_FLAGback to summary
pack-priv static final long SUBSCRIPTION_SET_FLAG
TERMINATEDback to summary
pack-priv static final FluxPublish.PubSubInner<T>[] TERMINATED
Annotations
@SuppressWarnings:rawtypes
TERMINATED_FLAGback to summary
pack-priv static final long TERMINATED_FLAG
WORK_IN_PROGRESS_MASKback to summary
pack-priv static final long WORK_IN_PROGRESS_MASK

Constructor Detail

PublishSubscriberback to summary
pack-priv PublishSubscriber(int prefetch, FluxPublish<T> parent)

Method Detail

addback to summary
pack-priv boolean add(FluxPublish.PublishInner<T> inner)
addWorkback to summary
pack-priv static long addWork(FluxPublish.PublishSubscriber<?> instance)
addWorkback to summary
pack-priv static long addWork(long state)
addWorkIfSubscribedback to summary
pack-priv static long addWorkIfSubscribed(FluxPublish.PublishSubscriber<?> instance)
checkTerminatedback to summary
pack-priv boolean checkTerminated(boolean d, boolean empty, T t)
clearback to summary
pack-priv void clear()
clearAndFinalizeback to summary
pack-priv static void clearAndFinalize(FluxPublish.PublishSubscriber<?> instance)
currentContextback to summary
public Context currentContext()

Overrides default reactor.core.CoreSubscriber.currentContext.

Doc from reactor.core.CoreSubscriber.currentContext.

Request a Context from dependent components which can include downstream operators during subscribing or a terminal org.reactivestreams.Subscriber.

Returns:Context

a resolved context or Context#empty()

Annotations
@Override
disconnectActionback to summary
pack-priv void disconnectAction(long previousState)
disposeback to summary
public void dispose()

Implements reactor.core.Disposable.dispose.

Doc from reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.

Implementations are required to make this method idempotent.

Annotations
@Override
drainback to summary
pack-priv final void drain(long expectedState)
drainFromInnerback to summary
pack-priv final void drainFromInner()
hasWorkInProgressback to summary
pack-priv static boolean hasWorkInProgress(long state)
innersback to summary
public Stream<? extends Scannable> inners()

Overrides default reactor.core.Scannable.inners.

Doc from reactor.core.Scannable.inners.

Return a Stream of referenced inners (flatmap, multicast etc)

Returns:Stream<? extends Scannable>

a Stream of referenced inners (flatmap, multicast etc)

Annotations
@Override
isCancelledback to summary
pack-priv static boolean isCancelled(long state)
isConnectedback to summary
pack-priv static boolean isConnected(long state)
isDisposedback to summary
public boolean isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Doc from reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.

Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.

Returns:boolean

true when there's a guarantee the resource or task is disposed.

Annotations
@Override
isFinalizedback to summary
pack-priv static boolean isFinalized(long state)
isSubscriptionSetback to summary
pack-priv static boolean isSubscriptionSet(long state)
isTerminatedback to summary
pack-priv boolean isTerminated()
isTerminatedback to summary
pack-priv static boolean isTerminated(long state)
markCancelledback to summary
pack-priv static long markCancelled(FluxPublish.PublishSubscriber<?> instance)
markConnectedback to summary
pack-priv static long markConnected(FluxPublish.PublishSubscriber<?> instance)
markSubscriptionSetback to summary
pack-priv static long markSubscriptionSet(FluxPublish.PublishSubscriber<?> instance)
markSubscriptionSetAndAddWorkback to summary
pack-priv static long markSubscriptionSetAndAddWork(FluxPublish.PublishSubscriber<?> instance)
markTerminatedback to summary
pack-priv static long markTerminated(FluxPublish.PublishSubscriber<?> instance)
markWorkDoneback to summary
pack-priv static long markWorkDone(FluxPublish.PublishSubscriber<?> instance, long expectedState)
onCompleteback to summary
public void onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Doc from org.reactivestreams.Subscriber.onComplete.

Successful terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Annotations
@Override
onErrorback to summary
public void onError(Throwable t)

Implements org.reactivestreams.Subscriber.onError.

Doc from org.reactivestreams.Subscriber.onError.

Failed terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Parameters
t:Throwable

the throwable signaled

Annotations
@Override
onNextback to summary
public void onNext(T t)

Implements org.reactivestreams.Subscriber.onNext.

Doc from org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).

Parameters
t:T

the element signaled

Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Subscription s)

Implements reactor.core.CoreSubscriber.onSubscribe.

Doc from reactor.core.CoreSubscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long). Should further onNext related state modification occur, thread-safety will be required.

Note that an invalid request <= 0 will not produce an onError and will simply be ignored or reported through a debug-enabled reactor.util.Logger. Invoked after calling Publisher#subscribe(Subscriber).

No data will start flowing until Subscription#request(long) is invoked.

It is the responsibility of this Subscriber instance to call Subscription#request(long) whenever more data is wanted.

The Publisher will send notifications only in response to Subscription#request(long).

Parameters
s:Subscription

Doc from org.reactivestreams.Subscriber.onSubscribe.

the Subscription that allows requesting data via Subscription#request(long)

Annotations
@Override
removeback to summary
public void remove(FluxPublish.PubSubInner<T> inner)
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Implements reactor.core.Scannable.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Override
@Nullable
terminateback to summary
pack-priv FluxPublish.PubSubInner<T>[] terminate()
Annotations
@SuppressWarnings:unchecked
tryConnectback to summary
pack-priv boolean tryConnect()
reactor.core.publisher back to summary

pack-priv abstract Class FluxPublish.PubSubInner<T>

extends Object
implements InnerProducer<T>
Class Inheritance
All Implemented Interfaces
reactor.core.publisher.InnerProducer, org.reactivestreams.Subscription, reactor.core.Scannable
Known Direct Subclasses
reactor.core.publisher.FluxPublish.PublishInner, reactor.core.publisher.EmitterProcessor.EmitterInner, reactor.core.publisher.SinkManyEmitterProcessor.EmitterInner

Field Summary

Modifier and TypeField and Description
pack-priv final CoreSubscriber<? super T>
pack-priv volatile long
pack-priv static final AtomicLongFieldUpdater<FluxPublish.PubSubInner<T>>

Constructor Summary

AccessConstructor and Description
pack-priv
PubSubInner(CoreSubscriber<? super T> actual)

Method Summary

Modifier and TypeMethod and Description
public final CoreSubscriber<? super T>
public final void
cancel()

Implements org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.
pack-priv abstract void
pack-priv final boolean
pack-priv abstract void
public final void
request(long
the strictly positive number of elements to requests to the upstream Publisher
n
)

Implements org.reactivestreams.Subscription.request.

No events will be sent by a Publisher until demand is signaled via this method.
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Overrides default reactor.core.publisher.InnerProducer.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

actualback to summary
pack-priv final CoreSubscriber<? super T> actual
requestedback to summary
pack-priv volatile long requested
REQUESTEDback to summary
pack-priv static final AtomicLongFieldUpdater<FluxPublish.PubSubInner<T>> REQUESTED
Annotations
@SuppressWarnings:rawtypes

Constructor Detail

PubSubInnerback to summary
pack-priv PubSubInner(CoreSubscriber<? super T> actual)

Method Detail

actualback to summary
public final CoreSubscriber<? super T> actual()

Implements reactor.core.publisher.InnerProducer.actual.

Annotations
@Override
cancelback to summary
public final void cancel()

Implements org.reactivestreams.Subscription.cancel.

Doc from org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.

Data may still be sent to meet previously signalled demand after calling cancel.

Annotations
@Override
drainParentback to summary
pack-priv abstract void drainParent()
isCancelledback to summary
pack-priv final boolean isCancelled()
removeAndDrainParentback to summary
pack-priv abstract void removeAndDrainParent()
requestback to summary
public final void request(long n)

Implements org.reactivestreams.Subscription.request.

Doc from org.reactivestreams.Subscription.request.

No events will be sent by a Publisher until demand is signaled via this method.

It can be called however often and whenever needed—but if the outstanding cumulative demand ever becomes Long.MAX_VALUE or more, it may be treated by the Publisher as "effectively unbounded".

Whatever has been requested can be sent by the Publisher so only signal demand for what can be safely handled.

A Publisher can send less than is requested if the stream ends but then must emit either Subscriber#onError(Throwable) or Subscriber#onComplete().

Parameters
n:long

the strictly positive number of elements to requests to the upstream Publisher

Annotations
@Override
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Overrides default reactor.core.publisher.InnerProducer.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Override
@Nullable