Class ServiceValueExecutor<T>
- java.lang.Object
-
- org.jboss.as.clustering.controller.ServiceValueExecutor<T>
-
- All Implemented Interfaces:
Consumer<T>,FunctionExecutor<T>,ServiceValueCaptor<T>,ServiceNameProvider
public class ServiceValueExecutor<T> extends Object implements ServiceValueCaptor<T>, FunctionExecutor<T>
Executes a given function against the captured value of a service.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description ServiceValueExecutor(org.jboss.msc.service.ServiceName name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(T value)<R,E extends Exception>
Rexecute(org.wildfly.common.function.ExceptionFunction<T,R,E> function)Executes the given function.org.jboss.msc.service.ServiceNamegetServiceName()
-
-
-
Method Detail
-
getServiceName
public org.jboss.msc.service.ServiceName getServiceName()
- Specified by:
getServiceNamein interfaceServiceNameProvider
-
execute
public <R,E extends Exception> R execute(org.wildfly.common.function.ExceptionFunction<T,R,E> function) throws E extends Exception
Description copied from interface:FunctionExecutorExecutes the given function.- Specified by:
executein interfaceFunctionExecutor<T>- Type Parameters:
R- the return typeE- the exception type- Parameters:
function- a function to execute- Returns:
- the result of the function
- Throws:
E- if the function fails to executeE extends Exception
-
-