Interface Processor<I,O> 
- Type Parameters:
- I- the type observed
- O- the type produced
- All Superinterfaces:
- Publisher<O>,- Subscriber<I>
- All Known Subinterfaces:
- Processor.Iso<V>,- Processor.Transactional<I,,- O> - Processor.TransactionalIso<V>
A combination of an 
Publisher and Subscriber.
 Processors are expected to broadcast their submitted values to any registered observers, though filtering or other transformations may be applied.
Submitting a completion event to the processor will result in a completion event being passed to every subscriber, and the rejection of further events being submitted.
- Since:
- 4.0.0
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA Processor that has the same type for inputs and outputs.static interfaceA processor that supports transactions.static interfaceA processor that supports transactions using the same input and outputs.Nested classes/interfaces inherited from interface org.spongepowered.configurate.reactive.PublisherPublisher.Cached<V>
- 
Method SummaryModifier and TypeMethodDescriptionbooleanClose this processor if there are no remaining subscriptions.static <V> Processor.Iso<V>create()Create aProcessorinstance that simply broadcasts submitted values to its subscribers.static <V> Processor.Iso<V>Create aProcessorinstance that simply broadcasts submitted values to its subscribers.static <V> Processor.TransactionalIso<V>Create a processor instance that is aware of transactions.static <V> Processor.TransactionalIso<V>createTransactional(Executor exec) Create a processor instance that is aware of transactions.voidfallbackHandler(@Nullable Subscriber<O> subscriber) Provide aSubscriberthat will handle events submitted to this processor, but only if no other subscription is active.voidSubmit an element of the observed type, bypassing any mapping this Processor may do.map(CheckedFunction<? super O, ? extends R, TransactionFailedException> mapper) Create a new publisher that will transform events published.Methods inherited from interface org.spongepowered.configurate.reactive.Publishercache, cache, executor, hasSubscribers, subscribeMethods inherited from interface org.spongepowered.configurate.reactive.SubscriberonClose, onError, submit
- 
Method Details- 
createCreate aProcessorinstance that simply broadcasts submitted values to its subscribers. Broadcasts will occur on the commonForkJoinPool.- Type Parameters:
- V- the type
- Returns:
- a new processor instance
- Since:
- 4.0.0
 
- 
createCreate aProcessorinstance that simply broadcasts submitted values to its subscribers.- Type Parameters:
- V- the type
- Parameters:
- executor- task executor
- Returns:
- a new processor instance
- Since:
- 4.0.0
 
- 
createTransactionalCreate a processor instance that is aware of transactions.- Type Parameters:
- V- the value type
- Returns:
- a new transactional processor
- Since:
- 4.0.0
 
- 
createTransactionalCreate a processor instance that is aware of transactions.Operations will be submitted to the provided executor. - Type Parameters:
- V- the value type
- Parameters:
- exec- executor to run operations on
- Returns:
- a new transactional processor
- Since:
- 4.0.0
 
- 
mapdefault <R> Processor<O,R> map(CheckedFunction<? super O, ? extends R, TransactionFailedException> mapper) Create a new publisher that will transform events published.
- 
injectSubmit an element of the observed type, bypassing any mapping this Processor may do. If the input type of this processor equals the output type, this is equivalent toSubscriber.submit(Object)- Parameters:
- element- the element to submit
- Since:
- 4.0.0
 
- 
fallbackHandlerProvide aSubscriberthat will handle events submitted to this processor, but only if no other subscription is active.- Parameters:
- subscriber- the fallback subscriber to add. Provide- nullto remove the handler
- Since:
- 4.0.0
 
- 
closeIfUnsubscribedboolean closeIfUnsubscribed()Close this processor if there are no remaining subscriptions. Any signals that have already been submitted will be processed.Any call to this method after the Processorhas been closed will simply return true.- Returns:
- true if there are no subscribers and this processor is closed
- Since:
- 4.0.0
 
 
-