Class SystemOutSubscriber<T>
java.lang.Object
com.oracle.coherence.concurrent.executor.subscribers.SystemOutSubscriber<T>
- Type Parameters:
T
- the type of result received
- All Implemented Interfaces:
Task.Subscriber<T>
A
Task.Subscriber
that logs interactions to the System.out
.- Since:
- 21.12
- Author:
- bo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Task.Subscription
TheTask.Subscription
for theTask.Subscriber
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Invoked by aTask.Coordinator
when it is known that no additionalTask.Subscriber
method invocations will occur or has already been terminated by an error.void
Invoked by aTask.Coordinator
when an unrecoverable error was encountered, after which no otherTask.Subscriber
methods are invoked.void
Invoked when aTask.Coordinator
has produced an item for consumption.void
onSubscribe
(Task.Subscription subscription) Invoked prior to theTask.Subscriber
methodsTask.Subscriber.onComplete()
,Task.Subscriber.onError(Throwable)
andTask.Subscriber.onNext(Object)
being invoked for aTask.Subscription
to aTask.Coordinator
.
-
Field Details
-
m_subscription
TheTask.Subscription
for theTask.Subscriber
.
-
-
Constructor Details
-
SystemOutSubscriber
public SystemOutSubscriber()
-
-
Method Details
-
onComplete
public void onComplete()Description copied from interface:Task.Subscriber
Invoked by aTask.Coordinator
when it is known that no additionalTask.Subscriber
method invocations will occur or has already been terminated by an error.After this method is invoked no other
Task.Subscriber
methods will be called.If this method throws an exception, the
Task.Subscriber
will be closed.- Specified by:
onComplete
in interfaceTask.Subscriber<T>
-
onError
Description copied from interface:Task.Subscriber
Invoked by aTask.Coordinator
when an unrecoverable error was encountered, after which no otherTask.Subscriber
methods are invoked.If this method throws an exception, the
Task.Subscriber
will be closed.- Specified by:
onError
in interfaceTask.Subscriber<T>
- Parameters:
throwable
- the error
-
onNext
Description copied from interface:Task.Subscriber
Invoked when aTask.Coordinator
has produced an item for consumption.If this method throws an exception, the
Task.Subscriber
will be closed.- Specified by:
onNext
in interfaceTask.Subscriber<T>
- Parameters:
item
- the item (possiblynull
)
-
onSubscribe
Description copied from interface:Task.Subscriber
Invoked prior to theTask.Subscriber
methodsTask.Subscriber.onComplete()
,Task.Subscriber.onError(Throwable)
andTask.Subscriber.onNext(Object)
being invoked for aTask.Subscription
to aTask.Coordinator
.- Specified by:
onSubscribe
in interfaceTask.Subscriber<T>
- Parameters:
subscription
- theTask.Subscription
-