Class ActivateMethod
java.lang.Object
org.apache.felix.scr.impl.inject.methods.BaseMethod<ActivatorParameter,Object>
org.apache.felix.scr.impl.inject.methods.ActivateMethod
- All Implemented Interfaces:
LifecycleMethod
- Direct Known Subclasses:
DeactivateMethod
,ModifiedMethod
public class ActivateMethod
extends BaseMethod<ActivatorParameter,Object>
implements LifecycleMethod
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.felix.scr.impl.inject.methods.BaseMethod
BaseMethod.MethodInfo<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionActivateMethod
(String methodName, boolean methodRequired, Class<?> componentClass, DSVersion dsVersion, boolean configurableServiceProperties, boolean supportsInterfaces) -
Method Summary
Modifier and TypeMethodDescriptionprotected BaseMethod.MethodInfo<Object>
doFindMethod
(Class<?> targetClass, boolean acceptPrivate, boolean acceptPackage, ComponentLogger logger) protected String
protected Object[]
getParameters
(Method method, ActivatorParameter rawParameter) Returns the parameter array created from therawParameter
using the actual parameter type list of themethod
.invoke
(Object componentInstance, ActivatorParameter rawParameter, MethodResult methodCallFailureResult) Calls the declared method on the given component with the provided method call arguments.invoke
(Object componentInstance, ScrComponentContext componentContext, int reason, MethodResult methodCallFailureResult) protected void
Methods inherited from class org.apache.felix.scr.impl.inject.methods.BaseMethod
accept, getComponentClass, getDSVersion, getMethod, getMethodName, getPackageName, isDS12Felix, methodExists, returnValue
-
Field Details
-
m_supportsInterfaces
protected final boolean m_supportsInterfaces
-
-
Constructor Details
-
ActivateMethod
-
-
Method Details
-
doFindMethod
protected BaseMethod.MethodInfo<Object> doFindMethod(Class<?> targetClass, boolean acceptPrivate, boolean acceptPackage, ComponentLogger logger) throws SuitableMethodNotAccessibleException, InvocationTargetException - Specified by:
doFindMethod
in classBaseMethod<ActivatorParameter,
Object> - Throws:
SuitableMethodNotAccessibleException
InvocationTargetException
-
setTypes
- Specified by:
setTypes
in classBaseMethod<ActivatorParameter,
Object>
-
getParameters
Description copied from class:BaseMethod
Returns the parameter array created from therawParameter
using the actual parameter type list of themethod
.- Specified by:
getParameters
in classBaseMethod<ActivatorParameter,
Object> - Returns:
-
getMethodNamePrefix
- Overrides:
getMethodNamePrefix
in classBaseMethod<ActivatorParameter,
Object>
-
invoke
public MethodResult invoke(Object componentInstance, ScrComponentContext componentContext, int reason, MethodResult methodCallFailureResult) - Specified by:
invoke
in interfaceLifecycleMethod
- See Also:
-
invoke
public MethodResult invoke(Object componentInstance, ActivatorParameter rawParameter, MethodResult methodCallFailureResult) Description copied from class:BaseMethod
Calls the declared method on the given component with the provided method call arguments.- Overrides:
invoke
in classBaseMethod<ActivatorParameter,
Object> - Parameters:
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.- Returns:
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.
-