public class ActivateMethod extends BaseMethod<ActivatorParameter,Object> implements LifecycleMethod
BaseMethod.MethodInfo<T>
Modifier and Type | Field and Description |
---|---|
protected boolean |
m_supportsInterfaces |
Constructor and Description |
---|
ActivateMethod(String methodName,
boolean methodRequired,
Class<?> componentClass,
DSVersion dsVersion,
boolean configurableServiceProperties,
boolean supportsInterfaces) |
Modifier and Type | Method and Description |
---|---|
protected BaseMethod.MethodInfo<Object> |
doFindMethod(Class<?> targetClass,
boolean acceptPrivate,
boolean acceptPackage,
ComponentLogger logger) |
protected String |
getMethodNamePrefix() |
protected Object[] |
getParameters(Method method,
ActivatorParameter rawParameter)
Returns the parameter array created from the
rawParameter
using the actual parameter type list of the method . |
MethodResult |
invoke(Object componentInstance,
ActivatorParameter rawParameter,
MethodResult methodCallFailureResult)
Calls the declared method on the given component with the provided
method call arguments.
|
MethodResult |
invoke(Object componentInstance,
ComponentContextImpl<?> componentContext,
int reason,
MethodResult methodCallFailureResult) |
protected void |
setTypes(Object types) |
accept, getComponentClass, getDSVersion, getMethod, getMethodName, getPackageName, isDS12Felix, methodExists, returnValue
protected BaseMethod.MethodInfo<Object> doFindMethod(Class<?> targetClass, boolean acceptPrivate, boolean acceptPackage, ComponentLogger logger) throws SuitableMethodNotAccessibleException, InvocationTargetException
doFindMethod
in class BaseMethod<ActivatorParameter,Object>
SuitableMethodNotAccessibleException
InvocationTargetException
protected void setTypes(Object types)
setTypes
in class BaseMethod<ActivatorParameter,Object>
protected Object[] getParameters(Method method, ActivatorParameter rawParameter)
BaseMethod
rawParameter
using the actual parameter type list of the method
.getParameters
in class BaseMethod<ActivatorParameter,Object>
protected String getMethodNamePrefix()
getMethodNamePrefix
in class BaseMethod<ActivatorParameter,Object>
public MethodResult invoke(Object componentInstance, ComponentContextImpl<?> componentContext, int reason, MethodResult methodCallFailureResult)
public MethodResult invoke(Object componentInstance, ActivatorParameter rawParameter, MethodResult methodCallFailureResult)
BaseMethod
invoke
in class BaseMethod<ActivatorParameter,Object>
componentInstance
- The component instance on which to call the
methodrawParameter
- The parameter container providing the actual
parameters to provide to the called methodmethodCallFailureResult
- The result to return from this method if
calling the method resulted in an exception.true
if the method was called successfully or the
method was not found and was not required. false
if
the method was not found but required.
methodCallFailureResult
is returned if the method was
found and called, but the method threw an exception.Copyright © 2006–2020 The Apache Software Foundation. All rights reserved.