Package org.wildfly.service
Class AsyncServiceBuilder<T>
- java.lang.Object
-
- org.jboss.msc.service.DelegatingServiceBuilder<T>
-
- org.wildfly.service.AsyncServiceBuilder<T>
-
- All Implemented Interfaces:
org.jboss.msc.service.ServiceBuilder<T>
public class AsyncServiceBuilder<T> extends org.jboss.msc.service.DelegatingServiceBuilder<T>AServiceBuilderdecorator whose installedServicewill start and/or stop asynchronously. This both reduces boilerplate code, and ensures that service implementors implement async behavior correctly.- Author:
- Paul Ferraro
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAsyncServiceBuilder.AsyncEnumerates theServicemethods that should execute asynchronously.
-
Constructor Summary
Constructors Constructor Description AsyncServiceBuilder(org.jboss.msc.service.ServiceBuilder<T> builder, Supplier<Executor> executor)Decorates a service builder transparently applying asynchronous start/stop semantics.AsyncServiceBuilder(org.jboss.msc.service.ServiceBuilder<T> builder, Supplier<Executor> executor, AsyncServiceBuilder.Async async)Decorates a service builder transparently applying asynchronous start/stop semantics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jboss.msc.service.ServiceBuilder<T>setInstance(org.jboss.msc.Service service)
-
-
-
Constructor Detail
-
AsyncServiceBuilder
public AsyncServiceBuilder(org.jboss.msc.service.ServiceBuilder<T> builder, Supplier<Executor> executor)
Decorates a service builder transparently applying asynchronous start/stop semantics.- Parameters:
builder- a service builderexecutor- an executor provider
-
AsyncServiceBuilder
public AsyncServiceBuilder(org.jboss.msc.service.ServiceBuilder<T> builder, Supplier<Executor> executor, AsyncServiceBuilder.Async async)
Decorates a service builder transparently applying asynchronous start/stop semantics.- Parameters:
builder- a service builderexecutor- an executor providerasync- indicates theServicemethods that should execute asynchronously
-
-