Package net.officefloor.reactor
Class ReactorMethodReturnManufacturerServiceFactory<R extends org.reactivestreams.Publisher<? super T>,T>
- java.lang.Object
-
- net.officefloor.reactor.ReactorMethodReturnManufacturerServiceFactory<R,T>
-
- All Implemented Interfaces:
ServiceFactory<MethodReturnManufacturer<?,?>>
,MethodReturnManufacturer<R,T>
,MethodReturnManufacturerServiceFactory
public class ReactorMethodReturnManufacturerServiceFactory<R extends org.reactivestreams.Publisher<? super T>,T> extends java.lang.Object implements MethodReturnManufacturerServiceFactory, MethodReturnManufacturer<R,T>
- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ReactorMethodReturnManufacturerServiceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodReturnTranslator<R,T>
createReturnTranslator(MethodReturnManufacturerContext<T> context)
Creates theMethodReturnTranslator
for the particularMethod
return.MethodReturnManufacturer<?,?>
createService(ServiceContext context)
Creates the service.
-
-
-
Method Detail
-
createService
public MethodReturnManufacturer<?,?> createService(ServiceContext context) throws java.lang.Throwable
Description copied from interface:ServiceFactory
Creates the service.- Specified by:
createService
in interfaceServiceFactory<R extends org.reactivestreams.Publisher<? super T>>
- Parameters:
context
-ServiceContext
.- Returns:
- Service.
- Throws:
java.lang.Throwable
- If fails to create the service.
-
createReturnTranslator
public MethodReturnTranslator<R,T> createReturnTranslator(MethodReturnManufacturerContext<T> context) throws java.lang.Exception
Description copied from interface:MethodReturnManufacturer
Creates the
MethodReturnTranslator
for the particularMethod
return.Should the
MethodReturnManufacturer
not handle the return value, it should returnnull
. This is because the firstMethodReturnManufacturer
providing aMethodReturnTranslator
will be used.- Specified by:
createReturnTranslator
in interfaceMethodReturnManufacturer<R extends org.reactivestreams.Publisher<? super T>,T>
- Parameters:
context
-MethodReturnManufacturerContext
.- Returns:
MethodReturnTranslator
ornull
if not able to handle return value.- Throws:
java.lang.Exception
- If fails to create theMethodReturnTranslator
.
-
-