Package org.refcodes.serial.ext.observer
Class ObservableSerialSugar
java.lang.Object
org.refcodes.serial.SerialSugar
org.refcodes.serial.ext.observer.ObservableSerialSugar
public class ObservableSerialSugar
extends org.refcodes.serial.SerialSugar
Declarative syntactic sugar which may be statically imported in order to
allow declarative definitions for the construction of observable various
Segment
or Section
type instances (and the like).-
Constructor Summary
Constructors Modifier Constructor Description protected
ObservableSerialSugar()
Instantiates a new observable serial sugar. -
Method Summary
Modifier and Type Method Description static <T> ObservablePayloadSectionDecorator<T>
observablePayloadSectionDecorator(org.refcodes.serial.PayloadSection<T> aDecoratee)
Constructs aObservablePayloadSection
wrapping the givenPayloadSection
decoratee and using a defaultExecutorService
and dispatching events in sequentially (as ofExecutionStrategy.SEQUENTIAL
).static <T> ObservablePayloadSectionDecorator<T>
observablePayloadSectionDecorator(org.refcodes.serial.PayloadSection<T> aDecoratee, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
Constructs aObservablePayloadSection
wrapping the givenPayloadSection
decoratee and using the providedExecutorService
when dispatching events in parallel (as ofExecutionStrategy.PARALLEL
andExecutionStrategy.JOIN
) and using the givenExecutionStrategy
when dispatching the events.static <T> ObservablePayloadSectionDecorator<T>
observablePayloadSectionDecorator(org.refcodes.serial.PayloadSection<T> aDecoratee, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
Constructs aObservablePayloadSection
wrapping the givenPayloadSection
decoratee and using the providedExecutionStrategy
when dispatching the events.static <T> ObservablePayloadSegmentDecorator<T>
observablePayloadSegmentDecorator(org.refcodes.serial.PayloadSegment<T> aDecoratee)
Constructs aObservablePayloadSegment
wrapping the givenPayloadSegment
decoratee and using a defaultExecutorService
and dispatching events in sequentially (as ofExecutionStrategy.SEQUENTIAL
).static <T> ObservablePayloadSegmentDecorator<T>
observablePayloadSegmentDecorator(org.refcodes.serial.PayloadSegment<T> aDecoratee, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
Constructs aObservablePayloadSegment
wrapping the givenPayloadSegment
decoratee and using the providedExecutorService
when dispatching events in parallel (as ofExecutionStrategy.PARALLEL
andExecutionStrategy.JOIN
) and using the givenExecutionStrategy
when dispatching the events.static <T> ObservablePayloadSegmentDecorator<T>
observablePayloadSegmentDecorator(org.refcodes.serial.PayloadSegment<T> aDecoratee, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
Constructs aObservablePayloadSegment
wrapping the givenPayloadSegment
decoratee and using the providedExecutionStrategy
when dispatching the events.static <DECORATEE extends org.refcodes.serial.Section>
ObservableSectionDecorator<DECORATEE>observableSection(DECORATEE aDecoratee)
Constructs aObservableSection
wrapping the givenSection
decoratee and using a defaultExecutorService
and dispatching events in sequentially (as ofExecutionStrategy.SEQUENTIAL
).static <DECORATEE extends org.refcodes.serial.Section>
ObservableSectionDecorator<DECORATEE>observableSection(DECORATEE aDecoratee, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
Constructs aObservableSection
wrapping the givenSection
decoratee and using the providedExecutorService
when dispatching events in parallel (as ofExecutionStrategy.PARALLEL
andExecutionStrategy.JOIN
) and using the givenExecutionStrategy
when dispatching the events.static <DECORATEE extends org.refcodes.serial.Section>
ObservableSectionDecorator<DECORATEE>observableSection(DECORATEE aDecoratee, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
Constructs aObservableSection
wrapping the givenSection
decoratee and using the providedExecutionStrategy
when dispatching the events.static <DECORATEE extends org.refcodes.serial.Segment>
ObservableSegmentDecorator<DECORATEE>observableSegment(DECORATEE aDecoratee)
Constructs aObservableSegment
wrapping the givenSegment
decoratee and using a defaultExecutorService
and dispatching events in sequentially (as ofExecutionStrategy.SEQUENTIAL
).static <DECORATEE extends org.refcodes.serial.Segment>
ObservableSegmentDecorator<DECORATEE>observableSegment(DECORATEE aDecoratee, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
Constructs aObservableSegment
wrapping the givenSegment
decoratee and using the providedExecutorService
when dispatching events in parallel (as ofExecutionStrategy.PARALLEL
andExecutionStrategy.JOIN
) and using the givenExecutionStrategy
when dispatching the events.static <DECORATEE extends org.refcodes.serial.Segment>
ObservableSegmentDecorator<DECORATEE>observableSegment(DECORATEE aDecoratee, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)
Constructs aObservableSegment
wrapping the givenSegment
decoratee and using the providedExecutionStrategy
when dispatching the events.Methods inherited from class org.refcodes.serial.SerialSugar
allocSegment, allocSegment, allocSegment, allocSegment, allocSegment, allocSegmentBody, allocSegmentHead, allocSegmentHead, allocSegmentHead, allocSegmentHead, allocSegmentHead, allocSegmentHead, allocSegmentHead, allocSegmentHead, allocSegmentHead, arraySection, arraySection, arraySection, arraySection, asciizArraySegment, asciizArraySegment, asciizArraySegment, asciizArraySegment, asciizArraySegment, asciizArraySegment, asciizArraySegment, asciizArraySegment, asciizArraySegment, asciizArraySegment, asciizArraySegment, asciizSegment, asciizSegment, asciizSegment, asciizSegment, asciizSegment, asciizSegment, asciizSegment, asciizSegment, asciizSegment, asciizSegment, asciizSegment, asciizSegment, asciizSegment, asciizSegment, asciizSegment, assertMagicBytesSection, assertMagicBytesSection, assertMagicBytesSection, assertMagicBytesSection, assertMagicBytesSection, assertMagicBytesSection, assertMagicBytesSegment, assertMagicBytesSegment, assertMagicBytesSegment, assertMagicBytesSegment, assertMagicBytesSegment, assertMagicBytesSegment, assertMagicBytesSegment, assertMagicBytesSegment, assertMagicBytesSegment, assertMagicBytesSegment, assertMagicBytesSegment, assertMagicBytesSegment, booleanArraySection, booleanArraySection, booleanArraySection, booleanArraySection, booleanArraySection, booleanArraySection, booleanSegment, booleanSegment, booleanSegment, booleanSegment, breakerSection, breakerSegment, byteArraySection, byteArraySection, byteArraySection, byteArraySection, byteArraySection, byteArraySection, byteSegment, byteSegment, byteSegment, byteSegment, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charArraySection, charSection, charSection, charSection, charSection, charSection, charSection, charSection, charSection, charSection, charSection, charSection, charSection, charSection, charSection, cipherSection, cipherSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, complexTypeSegment, crcPrefixSection, crcPrefixSection, crcPrefixSection, crcPrefixSection, crcPrefixSegment, crcPrefixSegment, crcPrefixSegment, crcPrefixSegment, crcSection, crcSection, crcSection, crcSection, crcSegment, crcSegment, crcSegment, crcSegment, crcSegment, crcSegmentPackager, crcSegmentPackager, crcSegmentPackager, crcSegmentPackager, crcSegmentPackager, crcSegmentPackager, crcSegmentPackager, crcSegmentPackager, crcSegmentPackager, crcSegmentPackager, crcSegmentPackager, crcSuffixSection, crcSuffixSection, crcSuffixSection, crcSuffixSection, crcSuffixSegment, crcSuffixSegment, crcSuffixSegment, crcSuffixSegment, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleArraySection, doubleSegment, doubleSegment, doubleSegment, doubleSegment, doubleSegment, doubleSegment, doubleSegment, doubleSegment, doubleSegment, doubleSegment, doubleSegment, doubleSegment, dummySegmentPackager, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, dynamicTypeSegment, fileSection, fileSection, fileSection, fileSection, fileSection, fileSection, fileSection, fileSection, fileSection, fixedLengthSequenceSegment, fixedLengthSequenceSegment, fixedLengthSequenceSegment, fixedLengthSequenceSegment, fixedSegmentArraySection, fixedSegmentArraySection, fixedSegmentArraySection, fixedSegmentArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatArraySection, floatSegment, floatSegment, floatSegment, floatSegment, floatSegment, floatSegment, floatSegment, floatSegment, floatSegment, floatSegment, floatSegment, floatSegment, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPort, fullDuplexTxPortBuilder, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intArraySection, intSegment, intSegment, intSegment, intSegment, intSegment, intSegment, intSegment, intSegment, intSegment, intSegment, intSegment, intSegment, invertibleSection, invertibleSection, invertibleSegment, invertibleSegment, lengthSegment, lengthSegment, lengthSegment, lengthSegment, lengthSegment, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longArraySection, longSegment, longSegment, longSegment, longSegment, longSegment, longSegment, longSegment, longSegment, longSegment, longSegment, longSegment, longSegment, magicBytesSection, magicBytesSection, magicBytesSection, magicBytesSection, magicBytesSection, magicBytesSection, magicBytesSection, magicBytesSection, magicBytesSectionDispatcher, magicBytesSectionDispatcher, magicBytesSectionDispatcher, magicBytesSectionDispatcher, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegmentDispatcher, magicBytesSegmentDispatcher, magicBytesSegmentDispatcher, magicBytesSegmentDispatcher, numberSegment, numberSegment, numberSegment, numberSegment, numberSegment, numberSegment, numberSegment, numberSegment, numberSegment, numberSegment, numberSegment, numberSegment, propertiesSection, propertiesSection, propertiesSection, propertiesSection, propertiesSection, propertiesSection, propertiesSection, propertiesSection, propertiesSection, propertiesSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSection, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToReceiveSegment, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSection, readyToSendSectionBuilder, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegment, readyToSendSegmentBuilder, segmentComposite, segmentComposite, segmentLength, segmentLength, segmentLength, segmentLength, segmentLength, segmentLength, segmentLength, segmentLength, segmentLength, segmentLength, sequenceNumberSegment, sequenceNumberSegment, sequenceNumberSegment, sequenceNumberSegment, sequenceSection, sequenceSection, sequenceSection, sequenceSection, sequenceSection, sequenceSection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortArraySection, shortSegment, shortSegment, shortSegment, shortSegment, shortSegment, shortSegment, shortSegment, shortSegment, shortSegment, shortSegment, shortSegment, shortSegment, stopAndWaitPacketStreamSection, stopAndWaitPacketStreamSection, stopAndWaitPacketStreamSectionBuilder, stopAndWaitPacketStreamSegment, stopAndWaitPacketStreamSegment, stopAndWaitPacketStreamSegmentBuilder, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSection, stopAndWaitSectionBuilder, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegment, stopAndWaitSegmentBuilder, stringArraySection, stringArraySection, stringArraySection, stringArraySection, stringArraySection, stringArraySection, stringArraySection, stringArraySection, stringArraySection, stringArraySection, stringArraySection, stringArraySection, stringSection, stringSection, stringSection, stringSection, stringSection, stringSection, stringSection, stringSection, stringSection, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegment, stringSegmentBuilder
-
Constructor Details
-
ObservableSerialSugar
protected ObservableSerialSugar()Instantiates a new observable serial sugar.
-
-
Method Details
-
observablePayloadSectionDecorator
public static <T> ObservablePayloadSectionDecorator<T> observablePayloadSectionDecorator(org.refcodes.serial.PayloadSection<T> aDecoratee)Constructs aObservablePayloadSection
wrapping the givenPayloadSection
decoratee and using a defaultExecutorService
and dispatching events in sequentially (as ofExecutionStrategy.SEQUENTIAL
).- Type Parameters:
T
- The type of the payload.- Parameters:
aDecoratee
- The decoratee to be wrapped by the observable decorator.- Returns:
- The accordingly created
BreakerSectionDecorator
.
-
observablePayloadSectionDecorator
public static <T> ObservablePayloadSectionDecorator<T> observablePayloadSectionDecorator(org.refcodes.serial.PayloadSection<T> aDecoratee, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)Constructs aObservablePayloadSection
wrapping the givenPayloadSection
decoratee and using the providedExecutionStrategy
when dispatching the events.- Type Parameters:
T
- The type of the payload.- Parameters:
aDecoratee
- The decoratee to be wrapped by the observable decorator.aExecutionStrategy
- the execution strategy to use when dispatching events.- Returns:
- The accordingly created
BreakerSectionDecorator
.
-
observablePayloadSectionDecorator
public static <T> ObservablePayloadSectionDecorator<T> observablePayloadSectionDecorator(org.refcodes.serial.PayloadSection<T> aDecoratee, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)Constructs aObservablePayloadSection
wrapping the givenPayloadSection
decoratee and using the providedExecutorService
when dispatching events in parallel (as ofExecutionStrategy.PARALLEL
andExecutionStrategy.JOIN
) and using the givenExecutionStrategy
when dispatching the events.- Type Parameters:
T
- The type of the payload.- Parameters:
aDecoratee
- The decoratee to be wrapped by the observable decorator.aExecutorService
- the executor service to use when dispatching events.aExecutionStrategy
- the execution strategy to use when dispatching events.- Returns:
- The accordingly created
BreakerSectionDecorator
.
-
observablePayloadSegmentDecorator
public static <T> ObservablePayloadSegmentDecorator<T> observablePayloadSegmentDecorator(org.refcodes.serial.PayloadSegment<T> aDecoratee)Constructs aObservablePayloadSegment
wrapping the givenPayloadSegment
decoratee and using a defaultExecutorService
and dispatching events in sequentially (as ofExecutionStrategy.SEQUENTIAL
).- Type Parameters:
T
- The type of the payload.- Parameters:
aDecoratee
- The decoratee to be wrapped by the observable decorator.- Returns:
- The accordingly created
BreakerSegmentDecorator
.
-
observablePayloadSegmentDecorator
public static <T> ObservablePayloadSegmentDecorator<T> observablePayloadSegmentDecorator(org.refcodes.serial.PayloadSegment<T> aDecoratee, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)Constructs aObservablePayloadSegment
wrapping the givenPayloadSegment
decoratee and using the providedExecutionStrategy
when dispatching the events.- Type Parameters:
T
- The type of the payload.- Parameters:
aDecoratee
- The decoratee to be wrapped by the observable decorator.aExecutionStrategy
- the execution strategy to use when dispatching events.- Returns:
- The accordingly created
BreakerSegmentDecorator
.
-
observablePayloadSegmentDecorator
public static <T> ObservablePayloadSegmentDecorator<T> observablePayloadSegmentDecorator(org.refcodes.serial.PayloadSegment<T> aDecoratee, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)Constructs aObservablePayloadSegment
wrapping the givenPayloadSegment
decoratee and using the providedExecutorService
when dispatching events in parallel (as ofExecutionStrategy.PARALLEL
andExecutionStrategy.JOIN
) and using the givenExecutionStrategy
when dispatching the events.- Type Parameters:
T
- The type of the payload.- Parameters:
aDecoratee
- The decoratee to be wrapped by the observable decorator.aExecutorService
- the executor service to use when dispatching events.aExecutionStrategy
- the execution strategy to use when dispatching events.- Returns:
- The accordingly created
BreakerSegmentDecorator
.
-
observableSection
public static <DECORATEE extends org.refcodes.serial.Section> ObservableSectionDecorator<DECORATEE> observableSection(DECORATEE aDecoratee)Constructs aObservableSection
wrapping the givenSection
decoratee and using a defaultExecutorService
and dispatching events in sequentially (as ofExecutionStrategy.SEQUENTIAL
).- Type Parameters:
DECORATEE
- The type of the observed decoratee in question.- Parameters:
aDecoratee
- The decoratee to be wrapped by the observable decorator.- Returns:
- The accordingly created
ObservableSectionDecorator
.
-
observableSection
public static <DECORATEE extends org.refcodes.serial.Section> ObservableSectionDecorator<DECORATEE> observableSection(DECORATEE aDecoratee, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)Constructs aObservableSection
wrapping the givenSection
decoratee and using the providedExecutionStrategy
when dispatching the events.- Type Parameters:
DECORATEE
- The type of the observed decoratee in question.- Parameters:
aDecoratee
- The decoratee to be wrapped by the observable decorator.aExecutionStrategy
- the execution strategy to use when dispatching events.- Returns:
- The accordingly created
ObservableSectionDecorator
.
-
observableSection
public static <DECORATEE extends org.refcodes.serial.Section> ObservableSectionDecorator<DECORATEE> observableSection(DECORATEE aDecoratee, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)Constructs aObservableSection
wrapping the givenSection
decoratee and using the providedExecutorService
when dispatching events in parallel (as ofExecutionStrategy.PARALLEL
andExecutionStrategy.JOIN
) and using the givenExecutionStrategy
when dispatching the events.- Type Parameters:
DECORATEE
- The type of the observed decoratee in question.- Parameters:
aDecoratee
- The decoratee to be wrapped by the observable decorator.aExecutorService
- the executor service to use when dispatching events.aExecutionStrategy
- the execution strategy to use when dispatching events.- Returns:
- The accordingly created
ObservableSectionDecorator
.
-
observableSegment
public static <DECORATEE extends org.refcodes.serial.Segment> ObservableSegmentDecorator<DECORATEE> observableSegment(DECORATEE aDecoratee)Constructs aObservableSegment
wrapping the givenSegment
decoratee and using a defaultExecutorService
and dispatching events in sequentially (as ofExecutionStrategy.SEQUENTIAL
).- Type Parameters:
DECORATEE
- The type of the observed decoratee in question.- Parameters:
aDecoratee
- The decoratee to be wrapped by the observable decorator.- Returns:
- The accordingly created
ObservableSegmentDecorator
.
-
observableSegment
public static <DECORATEE extends org.refcodes.serial.Segment> ObservableSegmentDecorator<DECORATEE> observableSegment(DECORATEE aDecoratee, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)Constructs aObservableSegment
wrapping the givenSegment
decoratee and using the providedExecutionStrategy
when dispatching the events.- Type Parameters:
DECORATEE
- The type of the observed decoratee in question.- Parameters:
aDecoratee
- The decoratee to be wrapped by the observable decorator.aExecutionStrategy
- the execution strategy to use when dispatching events.- Returns:
- The accordingly created
ObservableSegmentDecorator
.
-
observableSegment
public static <DECORATEE extends org.refcodes.serial.Segment> ObservableSegmentDecorator<DECORATEE> observableSegment(DECORATEE aDecoratee, ExecutorService aExecutorService, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy)Constructs aObservableSegment
wrapping the givenSegment
decoratee and using the providedExecutorService
when dispatching events in parallel (as ofExecutionStrategy.PARALLEL
andExecutionStrategy.JOIN
) and using the givenExecutionStrategy
when dispatching the events.- Type Parameters:
DECORATEE
- The type of the observed decoratee in question.- Parameters:
aDecoratee
- The decoratee to be wrapped by the observable decorator.aExecutorService
- the executor service to use when dispatching events.aExecutionStrategy
- the execution strategy to use when dispatching events.- Returns:
- The accordingly created
ObservableSegmentDecorator
.
-