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.Subscriberthat logs interactions to theSystem.out.- Since:
- 21.12
- Author:
- bo
-
-
Field Summary
Fields Modifier and Type Field Description protected Task.Subscriptionm_subscriptionTheTask.Subscriptionfor theTask.Subscriber.
-
Constructor Summary
Constructors Constructor Description SystemOutSubscriber()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonComplete()Invoked by aTask.Coordinatorwhen it is known that no additionalTask.Subscribermethod invocations will occur or has already been terminated by an error.voidonError(Throwable throwable)Invoked by aTask.Coordinatorwhen an unrecoverable error was encountered, after which no otherTask.Subscribermethods are invoked.voidonNext(T item)Invoked when aTask.Coordinatorhas produced an item for consumption.voidonSubscribe(Task.Subscription subscription)Invoked prior to theTask.SubscribermethodsTask.Subscriber.onComplete(),Task.Subscriber.onError(Throwable)andTask.Subscriber.onNext(Object)being invoked for aTask.Subscriptionto aTask.Coordinator.
-
-
-
Field Detail
-
m_subscription
protected Task.Subscription m_subscription
TheTask.Subscriptionfor theTask.Subscriber.
-
-
Method Detail
-
onComplete
public void onComplete()
Description copied from interface:Task.SubscriberInvoked by aTask.Coordinatorwhen it is known that no additionalTask.Subscribermethod invocations will occur or has already been terminated by an error.After this method is invoked no other
Task.Subscribermethods will be called.If this method throws an exception, the
Task.Subscriberwill be closed.- Specified by:
onCompletein interfaceTask.Subscriber<T>
-
onError
public void onError(Throwable throwable)
Description copied from interface:Task.SubscriberInvoked by aTask.Coordinatorwhen an unrecoverable error was encountered, after which no otherTask.Subscribermethods are invoked.If this method throws an exception, the
Task.Subscriberwill be closed.- Specified by:
onErrorin interfaceTask.Subscriber<T>- Parameters:
throwable- the error
-
onNext
public void onNext(T item)
Description copied from interface:Task.SubscriberInvoked when aTask.Coordinatorhas produced an item for consumption.If this method throws an exception, the
Task.Subscriberwill be closed.- Specified by:
onNextin interfaceTask.Subscriber<T>- Parameters:
item- the item (possiblynull)
-
onSubscribe
public void onSubscribe(Task.Subscription subscription)
Description copied from interface:Task.SubscriberInvoked prior to theTask.SubscribermethodsTask.Subscriber.onComplete(),Task.Subscriber.onError(Throwable)andTask.Subscriber.onNext(Object)being invoked for aTask.Subscriptionto aTask.Coordinator.- Specified by:
onSubscribein interfaceTask.Subscriber<T>- Parameters:
subscription- theTask.Subscription
-
-