@PublicAPI(stability=VOLATILE, mayInstantiate=false, mayExtend=false, mayInvoke=true) public class InvokableMethod extends Object
Constructor and Description |
---|
InvokableMethod(String name,
String description,
ConfigAttribute[] arguments,
String returnType,
boolean retrievesComponentInfo,
boolean updatesComponentInfo)
Creates a new invokable method with the provided information.
|
Modifier and Type | Method and Description |
---|---|
ConfigAttribute[] |
getArguments()
Retrieves the set of arguments for this invokable method.
|
String |
getDescription()
Retrieves a description of this invokable method.
|
String |
getName()
Retrieves the name of this invokable method.
|
String |
getReturnType()
Retrieves the return type for this invokable method.
|
boolean |
hasSignature(String methodName,
String[] argumentTypes)
Indicates whether this invokable method has the provided
signature.
|
Object |
invoke(InvokableComponent component,
Object[] parameters)
Calls upon the provided component to invoke this method using the
given parameters.
|
boolean |
retrievesComponentInfo()
Indicates whether this method retrieves information about the
associated component.
|
MBeanOperationInfo |
toOperationInfo()
Retrieves an
MBeanOperationInfo object that
encapsulates the information in this invokable method. |
String |
toString()
Retrieves a string representation of this invokable method.
|
boolean |
updatesComponentInfo()
Indicates whether this method updates information about the
associated component.
|
public InvokableMethod(String name, String description, ConfigAttribute[] arguments, String returnType, boolean retrievesComponentInfo, boolean updatesComponentInfo)
name
- The name for this invokable
method.description
- The description for this
invokable method.arguments
- The object types for this
method's arguments.returnType
- The object type for this method's
return value.retrievesComponentInfo
- Indicates whether this method
retrieves information about the
associated component.updatesComponentInfo
- Indicates whether this method
updates information about the
associated component.public String getName()
public String getDescription()
public ConfigAttribute[] getArguments()
public String getReturnType()
public boolean retrievesComponentInfo()
true
if this method retrieves information
about the associated component, or false
if
it does not.public boolean updatesComponentInfo()
true
if this method updates information
about the associated component, or false
if
it does not.public MBeanOperationInfo toOperationInfo()
MBeanOperationInfo
object that
encapsulates the information in this invokable method.MBeanOperationInfo
object that
encapsulates the information in this invokable method.public boolean hasSignature(String methodName, String[] argumentTypes)
methodName
- The method name to use in the
determination.argumentTypes
- The argument object types to use in the
determination.true
if this invokable method has the
provided signature, or false
if not.public Object invoke(InvokableComponent component, Object[] parameters) throws MBeanException
component
- The component to use to invoke this
method.parameters
- The set of method arguments to use when
invoking this method.null
if it did not return a value.MBeanException
- If a problem occurred while invoking the
method.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.