Package com.avoka.fc.core.service.impl
Class GroovyServiceImpl
- java.lang.Object
-
- com.avoka.fc.core.service.BaseService
-
- com.avoka.fc.core.service.AbstractGroovyService
-
- com.avoka.fc.core.service.impl.GroovyServiceImpl
-
- All Implemented Interfaces:
IGroovyService
,IServiceDefinitionAware
,IUnitTestableService
public class GroovyServiceImpl extends AbstractGroovyService implements IGroovyService
Provide an interface to invoke arbitrary Groovy services.- Since:
- 3.5.0
-
-
Constructor Summary
Constructors Constructor Description GroovyServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getErrorType()
Object
invokeService(Map<String,Object> parameters)
Invoke the configured groovyScript, passing the given parameters and returning the script result.-
Methods inherited from class com.avoka.fc.core.service.AbstractGroovyService
createExceptionAndLog, executeGroovyScript, executeGroovyScript, getCause, getExecutionTimeout, getGroovyScript, getGroovyServiceLog, getServiceDefinition, getServiceName, getServiceNameAndVersion, getServiceTimeout, getTestLogOutput, isExceptionDebugLoggingEnabled, isGroovyDebugLogging, isGroovyLoggingEnabled, isGroovyTypeChecked, runUnitTest, setExceptionDebugLoggingEnabled, setExecutionTimeout, setGroovyDebugLogging, setGroovyLoggingEnabled, setGroovyScript, setGroovyTypeChecked, setServiceDefinition, setUseModuleClassLoader
-
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.avoka.fc.core.service.IServiceDefinitionAware
getServiceDefinition, setServiceDefinition
-
-
-
-
Method Detail
-
getErrorType
public String getErrorType()
- Specified by:
getErrorType
in classAbstractGroovyService
- Returns:
- the service error type to be used to classify the error logging records
- Since:
- 4.3.4
-
invokeService
public Object invokeService(Map<String,Object> parameters)
Invoke the configured groovyScript, passing the given parameters and returning the script result.- Specified by:
invokeService
in interfaceIGroovyService
- Parameters:
parameters
- the script parameters- Returns:
- the results of the Groovy script invocation
-
-