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>
public class SystemOutSubscriber<T> extends Object implements Task.Subscriber<T>
ATask.Subscriber
that logs interactions to theSystem.out
.- Since:
- 21.12
- Author:
- bo
-
-
Field Summary
Fields Modifier and Type Field Description protected Task.Subscription
m_subscription
TheTask.Subscription
for theTask.Subscriber
.
-
Constructor Summary
Constructors Constructor Description SystemOutSubscriber()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onComplete()
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
onError(Throwable throwable)
Invoked by aTask.Coordinator
when an unrecoverable error was encountered, after which no otherTask.Subscriber
methods are invoked.void
onNext(T item)
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 Detail
-
m_subscription
protected Task.Subscription m_subscription
TheTask.Subscription
for theTask.Subscriber
.
-
-
Method Detail
-
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
public void onError(Throwable throwable)
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
public void onNext(T item)
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
public void onSubscribe(Task.Subscription subscription)
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
-
-