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.SubscriptionTheTask.Subscriptionfor theTask.Subscriber. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked by aTask.Coordinatorwhen it is known that no additionalTask.Subscribermethod invocations will occur or has already been terminated by an error.voidInvoked by aTask.Coordinatorwhen an unrecoverable error was encountered, after which no otherTask.Subscribermethods are invoked.voidInvoked 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 Details
-
m_subscription
TheTask.Subscriptionfor theTask.Subscriber.
-
-
Constructor Details
-
SystemOutSubscriber
public SystemOutSubscriber()
-
-
Method Details
-
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
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
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
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
-