Class PayloadBusEvent.Builder<P>
java.lang.Object
org.refcodes.eventbus.ext.application.ApplicationBusEvent.Builder
org.refcodes.eventbus.ext.application.PayloadBusEvent.Builder<P>
- Type Parameters:
P
- The type of the payload being carried by this event.
- All Implemented Interfaces:
org.refcodes.mixin.ActionAccessor.ActionBuilder<Enum<?>,
,ApplicationBusEvent.Builder> org.refcodes.mixin.AliasAccessor.AliasBuilder<ApplicationBusEvent.Builder>
,org.refcodes.mixin.ChannelAccessor.ChannelBuilder<ApplicationBusEvent.Builder>
,org.refcodes.mixin.GroupAccessor.GroupBuilder<ApplicationBusEvent.Builder>
,org.refcodes.mixin.MetaDataAccessor.MetaDataBuilder<org.refcodes.observer.EventMetaData,
,ApplicationBusEvent.Builder> org.refcodes.mixin.PayloadAccessor.PayloadBuilder<P,
,PayloadBusEvent.Builder<P>> org.refcodes.mixin.SourceAccessor.SourceBuilder<ApplicationBus,
,ApplicationBusEvent.Builder> org.refcodes.mixin.TypeAccessor.TypeBuilder<P,
,PayloadBusEvent.Builder<P>> org.refcodes.mixin.UniversalIdAccessor.UniversalIdBuilder<ApplicationBusEvent.Builder>
,org.refcodes.observer.PublisherTypeAccessor.PublisherTypeBuilder<ApplicationBusEvent.Builder>
- Enclosing class:
- PayloadBusEvent<P>
public static class PayloadBusEvent.Builder<P>
extends ApplicationBusEvent.Builder
implements org.refcodes.mixin.PayloadAccessor.PayloadBuilder<P,PayloadBusEvent.Builder<P>>, org.refcodes.mixin.TypeAccessor.TypeBuilder<P,PayloadBusEvent.Builder<P>>
Builder to build
PayloadBusEvent
.-
Field Summary
Fields inherited from class org.refcodes.eventbus.ext.application.ApplicationBusEvent.Builder
action, eventMetaData, source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builder method of the builder.withAction
(Enum<?> aAction) withChannel
(String aChannel) withMetaData
(org.refcodes.observer.EventMetaData aEventMetaData) Merges all not-null values of the providedEventMetaData
instance into thisApplicationBusEvent.Builder
instance.withPayload
(P aPayload) withPublisherType
(Class<?> aPublisherType) withSource
(ApplicationBus aSource) withUniversalId
(String aUid)
-
Constructor Details
-
Builder
protected Builder()Instantiates a new builder.
-
-
Method Details
-
withAction
- Specified by:
withAction
in interfaceorg.refcodes.mixin.ActionAccessor.ActionBuilder<Enum<?>,
ApplicationBusEvent.Builder> - Overrides:
withAction
in classApplicationBusEvent.Builder
-
withAlias
- Specified by:
withAlias
in interfaceorg.refcodes.mixin.AliasAccessor.AliasBuilder<P>
- Overrides:
withAlias
in classApplicationBusEvent.Builder
-
withChannel
- Specified by:
withChannel
in interfaceorg.refcodes.mixin.ChannelAccessor.ChannelBuilder<P>
- Overrides:
withChannel
in classApplicationBusEvent.Builder
-
withGroup
- Specified by:
withGroup
in interfaceorg.refcodes.mixin.GroupAccessor.GroupBuilder<P>
- Overrides:
withGroup
in classApplicationBusEvent.Builder
-
withMetaData
Merges all not-null values of the providedEventMetaData
instance into thisApplicationBusEvent.Builder
instance. Merges all not-null values of the providedEventMetaData
instance into thisPayloadBusEvent.Builder
instance.- Specified by:
withMetaData
in interfaceorg.refcodes.mixin.MetaDataAccessor.MetaDataBuilder<org.refcodes.observer.EventMetaData,
ApplicationBusEvent.Builder> - Overrides:
withMetaData
in classApplicationBusEvent.Builder
- Parameters:
aEventMetaData
- TheEventMetaData
instance to be merged into thisPayloadBusEvent.Builder
instance.- Returns:
- This
PayloadBusEvent.Builder
instance as of the builder pattern.
-
withPayload
- Specified by:
withPayload
in interfaceorg.refcodes.mixin.PayloadAccessor.PayloadBuilder<P,
PayloadBusEvent.Builder<P>>
-
withPublisherType
- Specified by:
withPublisherType
in interfaceorg.refcodes.observer.PublisherTypeAccessor.PublisherTypeBuilder<P>
- Overrides:
withPublisherType
in classApplicationBusEvent.Builder
-
withSource
- Specified by:
withSource
in interfaceorg.refcodes.mixin.SourceAccessor.SourceBuilder<ApplicationBus,
ApplicationBusEvent.Builder> - Overrides:
withSource
in classApplicationBusEvent.Builder
-
withType
- Specified by:
withType
in interfaceorg.refcodes.mixin.TypeAccessor.TypeBuilder<P,
PayloadBusEvent.Builder<P>>
-
withUniversalId
- Specified by:
withUniversalId
in interfaceorg.refcodes.mixin.UniversalIdAccessor.UniversalIdBuilder<P>
- Overrides:
withUniversalId
in classApplicationBusEvent.Builder
-
build
Builder method of the builder.- Overrides:
build
in classApplicationBusEvent.Builder
- Returns:
- The built instance.
-