- java.lang.Object
-
- javax.management.MBeanFeatureInfo
-
- javax.management.MBeanOperationInfo
-
- javax.management.modelmbean.ModelMBeanOperationInfo
-
- All Implemented Interfaces:
- Serializable, Cloneable, DescriptorAccess, DescriptorRead
public class ModelMBeanOperationInfo extends MBeanOperationInfo implements DescriptorAccess
The ModelMBeanOperationInfo object describes a management operation of the ModelMBean. It is a subclass of MBeanOperationInfo with the addition of an associated Descriptor and an implementation of the DescriptorAccess interface.
The fields in the descriptor are defined, but not limited to, the following. Note that when the Type in this table is Number, a String that is the decimal representation of a Long can also be used.
Name Type Meaning name String Operation name. descriptorType String Must be "operation". class String Class where method is defined (fully qualified). role String Must be "operation", "getter", or "setter". targetObject Object Object on which to execute this method. targetType String type of object reference for targetObject. Can be: ObjectReference | Handle | EJBHandle | IOR | RMIReference. value Object Cached value for operation. displayName String Human readable display name of the operation. currencyTimeLimit Number How long cached value is valid. lastUpdatedTimeStamp Number When cached value was set. visibility Number 1-4 where 1: always visible 4: rarely visible. presentationString String XML formatted string to describe how to present operation The default descriptor will have name, descriptorType, displayName and role fields set. The default value of the name and displayName fields is the operation name.
Note: because of inconsistencies in previous versions of this specification, it is recommended not to use negative or zero values for
currencyTimeLimit
. To indicate that a cached value is never valid, omit thecurrencyTimeLimit
field. To indicate that it is always valid, use a very large number for this field.The serialVersionUID of this class is
6532732096650090465L
.- Since:
- 1.5
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.management.MBeanOperationInfo
ACTION, ACTION_INFO, INFO, UNKNOWN
-
Fields inherited from class javax.management.MBeanFeatureInfo
description, name
-
-
Constructor Summary
Constructors Constructor and Description ModelMBeanOperationInfo(ModelMBeanOperationInfo inInfo)
Constructs a new ModelMBeanOperationInfo object from this ModelMBeanOperation Object.ModelMBeanOperationInfo(String description, Method operationMethod)
Constructs a ModelMBeanOperationInfo object with a default descriptor.ModelMBeanOperationInfo(String description, Method operationMethod, Descriptor descriptor)
Constructs a ModelMBeanOperationInfo object.ModelMBeanOperationInfo(String name, String description, MBeanParameterInfo[] signature, String type, int impact)
Constructs a ModelMBeanOperationInfo object with a default descriptor.ModelMBeanOperationInfo(String name, String description, MBeanParameterInfo[] signature, String type, int impact, Descriptor descriptor)
Constructs a ModelMBeanOperationInfo object.
-
Method Summary
Methods Modifier and Type Method and Description Object
clone()
Creates and returns a new ModelMBeanOperationInfo which is a duplicate of this ModelMBeanOperationInfo.Descriptor
getDescriptor()
Returns a copy of the associated Descriptor of the ModelMBeanOperationInfo.void
setDescriptor(Descriptor inDescriptor)
Sets associated Descriptor (full replace) for the ModelMBeanOperationInfo If the new Descriptor is null, then the associated Descriptor reverts to a default descriptor.String
toString()
Returns a string containing the entire contents of the ModelMBeanOperationInfo in human readable form.-
Methods inherited from class javax.management.MBeanOperationInfo
equals, getImpact, getReturnType, getSignature, hashCode
-
Methods inherited from class javax.management.MBeanFeatureInfo
getDescription, getName
-
-
-
-
Constructor Detail
-
ModelMBeanOperationInfo
public ModelMBeanOperationInfo(String description, Method operationMethod)
Constructs a ModelMBeanOperationInfo object with a default descriptor. TheDescriptor
of the constructed object will include fields contributed by any annotations on theMethod
object that contain theDescriptorKey
meta-annotation.- Parameters:
operationMethod
- The java.lang.reflect.Method object describing the MBean operation.description
- A human readable description of the operation.
-
ModelMBeanOperationInfo
public ModelMBeanOperationInfo(String description, Method operationMethod, Descriptor descriptor)
Constructs a ModelMBeanOperationInfo object. TheDescriptor
of the constructed object will include fields contributed by any annotations on theMethod
object that contain theDescriptorKey
meta-annotation.- Parameters:
operationMethod
- The java.lang.reflect.Method object describing the MBean operation.description
- A human readable description of the operation.descriptor
- An instance of Descriptor containing the appropriate metadata for this instance of the ModelMBeanOperationInfo. If it is null a default descriptor will be created. If the descriptor does not contain the fields "displayName" or "role", the missing ones are added with their default values.- Throws:
RuntimeOperationsException
- Wraps an IllegalArgumentException. The descriptor is invalid; or descriptor field "name" is not equal to operation name; or descriptor field "DescriptorType" is not equal to "operation"; or descriptor optional field "role" is present but not equal to "operation", "getter", or "setter".
-
ModelMBeanOperationInfo
public ModelMBeanOperationInfo(String name, String description, MBeanParameterInfo[] signature, String type, int impact)
Constructs a ModelMBeanOperationInfo object with a default descriptor.- Parameters:
name
- The name of the method.description
- A human readable description of the operation.signature
- MBeanParameterInfo objects describing the parameters(arguments) of the method.type
- The type of the method's return value.impact
- The impact of the method, one of INFO, ACTION, ACTION_INFO, UNKNOWN.
-
ModelMBeanOperationInfo
public ModelMBeanOperationInfo(String name, String description, MBeanParameterInfo[] signature, String type, int impact, Descriptor descriptor)
Constructs a ModelMBeanOperationInfo object.- Parameters:
name
- The name of the method.description
- A human readable description of the operation.signature
- MBeanParameterInfo objects describing the parameters(arguments) of the method.type
- The type of the method's return value.impact
- The impact of the method, one of INFO, ACTION, ACTION_INFO, UNKNOWN.descriptor
- An instance of Descriptor containing the appropriate metadata for this instance of the MBeanOperationInfo. If it is null then a default descriptor will be created. If the descriptor does not contain fields "displayName" or "role", the missing ones are added with their default values.- Throws:
RuntimeOperationsException
- Wraps an IllegalArgumentException. The descriptor is invalid; or descriptor field "name" is not equal to operation name; or descriptor field "DescriptorType" is not equal to "operation"; or descriptor optional field "role" is present but not equal to "operation", "getter", or "setter".
-
ModelMBeanOperationInfo
public ModelMBeanOperationInfo(ModelMBeanOperationInfo inInfo)
Constructs a new ModelMBeanOperationInfo object from this ModelMBeanOperation Object.- Parameters:
inInfo
- the ModelMBeanOperationInfo to be duplicated
-
-
Method Detail
-
clone
public Object clone()
Creates and returns a new ModelMBeanOperationInfo which is a duplicate of this ModelMBeanOperationInfo.- Overrides:
clone
in classMBeanOperationInfo
- Returns:
- a clone of this instance.
- See Also:
Cloneable
-
getDescriptor
public Descriptor getDescriptor()
Returns a copy of the associated Descriptor of the ModelMBeanOperationInfo.- Specified by:
getDescriptor
in interfaceDescriptorRead
- Overrides:
getDescriptor
in classMBeanFeatureInfo
- Returns:
- Descriptor associated with the ModelMBeanOperationInfo object.
- See Also:
setDescriptor(javax.management.Descriptor)
-
setDescriptor
public void setDescriptor(Descriptor inDescriptor)
Sets associated Descriptor (full replace) for the ModelMBeanOperationInfo If the new Descriptor is null, then the associated Descriptor reverts to a default descriptor. The Descriptor is validated before it is assigned. If the new Descriptor is invalid, then a RuntimeOperationsException wrapping an IllegalArgumentException is thrown.- Specified by:
setDescriptor
in interfaceDescriptorAccess
- Parameters:
inDescriptor
- replaces the Descriptor associated with the ModelMBeanOperation.- Throws:
RuntimeOperationsException
- Wraps an IllegalArgumentException for invalid Descriptor.- See Also:
getDescriptor()
-
toString
public String toString()
Returns a string containing the entire contents of the ModelMBeanOperationInfo in human readable form.- Overrides:
toString
in classMBeanOperationInfo
- Returns:
- a string representation of the object.
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/management/modelmbean/ModelMBeanOperationInfo.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.