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
ConstructorsModifierConstructorDescriptionprotectedInstantiates a new observable serial sugar. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ObservablePayloadSectionDecorator<T>observablePayloadSectionDecorator(org.refcodes.serial.PayloadSection<T> aDecoratee) Constructs aObservablePayloadSectionwrapping the givenPayloadSectiondecoratee and using a defaultExecutorServiceand 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 aObservablePayloadSectionwrapping the givenPayloadSectiondecoratee and using the providedExecutorServicewhen dispatching events in parallel (as ofExecutionStrategy.PARALLELandExecutionStrategy.JOIN) and using the givenExecutionStrategywhen dispatching the events.static <T> ObservablePayloadSectionDecorator<T>observablePayloadSectionDecorator(org.refcodes.serial.PayloadSection<T> aDecoratee, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) Constructs aObservablePayloadSectionwrapping the givenPayloadSectiondecoratee and using the providedExecutionStrategywhen dispatching the events.static <T> ObservablePayloadSegmentDecorator<T>observablePayloadSegmentDecorator(org.refcodes.serial.PayloadSegment<T> aDecoratee) Constructs aObservablePayloadSegmentwrapping the givenPayloadSegmentdecoratee and using a defaultExecutorServiceand 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 aObservablePayloadSegmentwrapping the givenPayloadSegmentdecoratee and using the providedExecutorServicewhen dispatching events in parallel (as ofExecutionStrategy.PARALLELandExecutionStrategy.JOIN) and using the givenExecutionStrategywhen dispatching the events.static <T> ObservablePayloadSegmentDecorator<T>observablePayloadSegmentDecorator(org.refcodes.serial.PayloadSegment<T> aDecoratee, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) Constructs aObservablePayloadSegmentwrapping the givenPayloadSegmentdecoratee and using the providedExecutionStrategywhen dispatching the events.static <DECORATEE extends org.refcodes.serial.Section>
ObservableSectionDecorator<DECORATEE>observableSection(DECORATEE aDecoratee) Constructs aObservableSectionwrapping the givenSectiondecoratee and using a defaultExecutorServiceand 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 aObservableSectionwrapping the givenSectiondecoratee and using the providedExecutorServicewhen dispatching events in parallel (as ofExecutionStrategy.PARALLELandExecutionStrategy.JOIN) and using the givenExecutionStrategywhen dispatching the events.static <DECORATEE extends org.refcodes.serial.Section>
ObservableSectionDecorator<DECORATEE>observableSection(DECORATEE aDecoratee, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) Constructs aObservableSectionwrapping the givenSectiondecoratee and using the providedExecutionStrategywhen dispatching the events.static <DECORATEE extends org.refcodes.serial.Segment>
ObservableSegmentDecorator<DECORATEE>observableSegment(DECORATEE aDecoratee) Constructs aObservableSegmentwrapping the givenSegmentdecoratee and using a defaultExecutorServiceand 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 aObservableSegmentwrapping the givenSegmentdecoratee and using the providedExecutorServicewhen dispatching events in parallel (as ofExecutionStrategy.PARALLELandExecutionStrategy.JOIN) and using the givenExecutionStrategywhen dispatching the events.static <DECORATEE extends org.refcodes.serial.Segment>
ObservableSegmentDecorator<DECORATEE>observableSegment(DECORATEE aDecoratee, org.refcodes.controlflow.ExecutionStrategy aExecutionStrategy) Constructs aObservableSegmentwrapping the givenSegmentdecoratee and using the providedExecutionStrategywhen 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, 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, crcPrefixSegment, crcSection, 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, 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, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, dynamicTypeSection, 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, enumSegment, enumSegment, enumSegment, enumSegment, enumSegment, enumSegment, enumSegment, enumSegment, enumSegment, enumSegment, enumSegment, 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, 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, magicBytesSectionMultiplexer, magicBytesSectionMultiplexer, magicBytesSectionMultiplexer, magicBytesSectionMultiplexer, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegment, magicBytesSegmentMultiplexer, magicBytesSegmentMultiplexer, magicBytesSegmentMultiplexer, magicBytesSegmentMultiplexer, nullSegment, 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, 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 aObservablePayloadSectionwrapping the givenPayloadSectiondecoratee and using a defaultExecutorServiceand 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 aObservablePayloadSectionwrapping the givenPayloadSectiondecoratee and using the providedExecutionStrategywhen 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 aObservablePayloadSectionwrapping the givenPayloadSectiondecoratee and using the providedExecutorServicewhen dispatching events in parallel (as ofExecutionStrategy.PARALLELandExecutionStrategy.JOIN) and using the givenExecutionStrategywhen 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 aObservablePayloadSegmentwrapping the givenPayloadSegmentdecoratee and using a defaultExecutorServiceand 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 aObservablePayloadSegmentwrapping the givenPayloadSegmentdecoratee and using the providedExecutionStrategywhen 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 aObservablePayloadSegmentwrapping the givenPayloadSegmentdecoratee and using the providedExecutorServicewhen dispatching events in parallel (as ofExecutionStrategy.PARALLELandExecutionStrategy.JOIN) and using the givenExecutionStrategywhen 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 aObservableSectionwrapping the givenSectiondecoratee and using a defaultExecutorServiceand 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 aObservableSectionwrapping the givenSectiondecoratee and using the providedExecutionStrategywhen 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 aObservableSectionwrapping the givenSectiondecoratee and using the providedExecutorServicewhen dispatching events in parallel (as ofExecutionStrategy.PARALLELandExecutionStrategy.JOIN) and using the givenExecutionStrategywhen 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 aObservableSegmentwrapping the givenSegmentdecoratee and using a defaultExecutorServiceand 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 aObservableSegmentwrapping the givenSegmentdecoratee and using the providedExecutionStrategywhen 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 aObservableSegmentwrapping the givenSegmentdecoratee and using the providedExecutorServicewhen dispatching events in parallel (as ofExecutionStrategy.PARALLELandExecutionStrategy.JOIN) and using the givenExecutionStrategywhen 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.
-