ComponentMethodDeactivateMethod, ModifiedMethodpublic class ActivateMethod extends BaseMethod<ActivatorParameter,Object> implements ComponentMethod
BaseMethod.MethodInfo<T>| Modifier and Type | Field | Description |
|---|---|---|
protected static Class<?> |
BUNDLE_CONTEXT_CLASS |
|
protected static Class<?> |
COMPONENT_CONTEXT_CLASS |
|
protected static Class<?> |
INTEGER_CLASS |
|
protected boolean |
m_supportsInterfaces |
| Constructor | Description |
|---|---|
ActivateMethod(String methodName,
boolean methodRequired,
Class<?> componentClass,
DSVersion dsVersion,
boolean configurableServiceProperties,
boolean supportsInterfaces) |
| Modifier and Type | Method | Description |
|---|---|---|
protected BaseMethod.MethodInfo<Object> |
doFindMethod(Class<?> targetClass,
boolean acceptPrivate,
boolean acceptPackage,
SimpleLogger 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,
SimpleLogger logger) |
Calls the declared method on the given component with the provided
method call arguments.
|
MethodResult |
invoke(Object componentInstance,
org.osgi.service.component.ComponentContext componentContext,
int reason,
MethodResult methodCallFailureResult,
SimpleLogger logger) |
|
protected void |
setTypes(Object types) |
accept, getComponentClass, getDSVersion, getMethod, getMethodName, getPackageName, isDS12Felix, methodExists, returnValueprotected static final Class<?> COMPONENT_CONTEXT_CLASS
protected static final Class<?> BUNDLE_CONTEXT_CLASS
protected static final Class<?> INTEGER_CLASS
protected final boolean m_supportsInterfaces
protected BaseMethod.MethodInfo<Object> doFindMethod(Class<?> targetClass, boolean acceptPrivate, boolean acceptPackage, SimpleLogger logger) throws SuitableMethodNotAccessibleException, InvocationTargetException
doFindMethod in class BaseMethod<ActivatorParameter,Object>SuitableMethodNotAccessibleExceptionInvocationTargetExceptionprotected void setTypes(Object types)
setTypes in class BaseMethod<ActivatorParameter,Object>protected Object[] getParameters(Method method, ActivatorParameter rawParameter)
BaseMethodrawParameter
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, org.osgi.service.component.ComponentContext componentContext, int reason, MethodResult methodCallFailureResult, SimpleLogger logger)
invoke in interface ComponentMethodpublic MethodResult invoke(Object componentInstance, ActivatorParameter rawParameter, MethodResult methodCallFailureResult, SimpleLogger logger)
BaseMethodinvoke 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–2019 The Apache Software Foundation. All rights reserved.