Top Description Inners Methods
jakarta.enterprise.event

public Interface NotificationOptions

Known Direct Implementers
jakarta.enterprise.event.ImmutableNotificationOptions
Imports
java.util.concurrent.Executor

Notification options are used to configure observer notification.
Author
Martin Kouba
Since
2.0
See Also
Event#fireAsync(Object, NotificationOptions)

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
NotificationOptions.Builder

Notification options builder.

Method Summary

Modifier and TypeMethod and Description
public static NotificationOptions.Builder

Returns:

the options builder
builder
()

public Object

Returns:

the value of an option or null if no option for the given name exists
get
(String
name of the option to get value of
optionName
)

public Executor

Returns:

the executor used to execute an asynchronous event
getExecutor
()

public static NotificationOptions

Returns:

an immutable holder of a single option
of
(String
name of the option to set
optionName
,
Object
value for the option
optionValue
)

public static NotificationOptions

Returns:

an immutable holder of an executor
ofExecutor
(Executor
a specific Executor to handle observer notification
executor
)

Method Detail

builderback to summary
public static NotificationOptions.Builder builder()
Returns:NotificationOptions.Builder

the options builder

getback to summary
public Object get(String optionName)
Parameters
optionName:String

name of the option to get value of

Returns:Object

the value of an option or null if no option for the given name exists

getExecutorback to summary
public Executor getExecutor()
Returns:Executor

the executor used to execute an asynchronous event

ofback to summary
public static NotificationOptions of(String optionName, Object optionValue)
Parameters
optionName:String

name of the option to set

optionValue:Object

value for the option

Returns:NotificationOptions

an immutable holder of a single option

ofExecutorback to summary
public static NotificationOptions ofExecutor(Executor executor)
Parameters
executor:Executor

a specific Executor to handle observer notification

Returns:NotificationOptions

an immutable holder of an executor

jakarta.enterprise.event back to summary

public Interface NotificationOptions.Builder

Known Direct Implementers
jakarta.enterprise.event.ImmutableNotificationOptions.Builder

Notification options builder.
Author
Martin Kouba
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public NotificationOptions

Returns:

NotificationOptions
build
()

Build the notification options

public NotificationOptions.Builder

Returns:

this
set
(String
option name
optionName
,
Object
option value
optionValue
)

Set an option value

public NotificationOptions.Builder

Returns:

this
setExecutor
(Executor executor)

Set the notification executor

Method Detail

buildback to summary
public NotificationOptions build()

Build the notification options

Returns:NotificationOptions

NotificationOptions

setback to summary
public NotificationOptions.Builder set(String optionName, Object optionValue)

Set an option value

Parameters
optionName:String

option name

optionValue:Object

option value

Returns:NotificationOptions.Builder

this

setExecutorback to summary
public NotificationOptions.Builder setExecutor(Executor executor)

Set the notification executor

Parameters
executor:Executor

the Executor

Returns:NotificationOptions.Builder

this