Package com.ptc.customersupport.mbeans
Class AbstractPlugin
java.lang.Object
javax.management.StandardMBean
wt.jmx.core.StandardMBean
wt.jmx.core.SelfAwareMBean
com.ptc.customersupport.mbeans.AbstractPlugin
- All Implemented Interfaces:
PluginMBean,DynamicMBean,MBeanRegistration,BaseObjectNamed,SelfEmailingMBean
- Direct Known Subclasses:
AbstractMultipleFilePlugin,AbstractQMLPlugin,AbstractSQLPlugin,GatherFilePlugin,GatherFolderPlugin,GatherInfoScriptPlugin,GatherLogsPlugin,MBeanDumpPlugin,WDSPlugin
This abstract class represents the basic information about a plug-in.
This class wraps much of the complexity of implementing the PluginMBean
and SelfAwareMBean interface for a plugin.
This class provides concrete implementations of methods that can be used
via inheritance from classes which extend it.
This is the base parent class for all plugins and all plugins must
extend this class either directly or hierarchically.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionThe two abstract collect(...) methods are part of the PluginMBean interface and must be implemented by all plugins.The two abstract collect(...) methods are part of the PluginMBean interface and must be implemented by all plugins.Methods inherited from class wt.jmx.core.SelfAwareMBean
deregister, destroy, getBaseObjectName, getObjectName, getObjectNameOnPreRegister, getOwnerMBean, getRegisteredMBeanIterator, getSelfAwareMBean, init, isAutoStart, isInited, isRegistered, isStarted, onDestroy, onInit, onStart, onStop, postDeregister, postRegister, preDeregister, preRegister, register, register, register, resetObjectName, setAutoStart, setOwnerMBean, start, stopMethods inherited from class wt.jmx.core.StandardMBean
cacheMBeanInfo, cacheMBeanInfoInInstance, createMBeanInfo, emailThisMBean, getAttributes, getCachedInstanceMBeanInfo, getCachedMBeanInfo, getDescription, getDescription, getDescription, getDescription, getImpact, getMBeanInfo, getParameterName, setAttributes, sortMethods inherited from class javax.management.StandardMBean
getAttribute, getClassName, getConstructors, getDescription, getDescription, getDescription, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, invoke, setAttribute, setImplementationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Method Details
-
collect
public abstract Map<String,Object> collect(long callNumber, long maxAgeInDays, long minAgeInDays, String pathTimeStamp) The two abstract collect(...) methods are part of the PluginMBean interface and must be implemented by all plugins. These methods specify the APIs necessary to interact with the Collector class and plugin Collection framework that accomplishes the plugin work when gathering files. In general cases, the AbstractPlugin and other Abstract classes the the com.ptc.customersupport.mbeans.* packages in the plugin hierarchy provide default implementations that can be relied upon for the collect(...) methods. Specifically, the collectData(...) method of AbstractPlugin.java can often simply be called by the collect(...) methods. However, more advanced plugins that handle very specific needs may require these methods to be overridden and implemented directly, not relying on default behavior. Generally, these cases are rare and only occur when a plugin isn't simply collecting files but rather needs to run some Java process or invoke some separate operation that does processing which results in a file that then needs to be collected. There are plugins in the com.ptc.customersupport.plugin.* packages that do this which can be examined for examples, specifically, see MBeanDumpPlugin.java, WDSPlugin.java and AbstractWinduPlugin.java. A sample collect(...) method implementation would be:- Specified by:
collectin interfacePluginMBean- Parameters:
callNumber- This is a long value that is associated with a PTC Technical Support call number. It is used as a location to collect plugin data to. This value should not need to be modified by the collect(...) method implementation.maxAgeInDays- A long value that is a starting time value for if files are collected with respect to time. This value should not need to be modified by the collect(...) method implementation.minAgeInDays- A long value that is an ending time value for if files are collected with respect to time. This value should not need to be modified by the collect(...) method implementation.pathTimeStamp- A String representation of a directory timestamp used as a name which plugins collect their data to. This value should not need to be modified by the collect(...) method implementation.- Returns:
- Mapinvalid input: '<'String,Object> The return type is a Map that contains
an inner Map. Mapinvalid input: '<'String,
Mapinvalid input: '<'String, String>>. The "inner"
Mapinvalid input: '<'String, String> is a Map that contains
the plugin execution status. The outer
Mapinvalid input: '<'String, Object> is a Map that contains
which server the plugin executed on. This
allows the plugin framework to report
information across the cluster for each
plugin executed.
Supported API: true
-
collect
public abstract Map<String,Object> collect(String topicIdentifier, long maxAgeInDays, long minAgeInDays, String pathTimeStamp) The two abstract collect(...) methods are part of the PluginMBean interface and must be implemented by all plugins. These methods specify the APIs necessary to interact with the Collector class and plugin Collection framework that accomplishes the plugin work when gathering files. In general cases, the AbstractPlugin and other Abstract classes the the com.ptc.customersupport.mbeans.* packages in the plugin hierarchy provide default implementations that can be relied upon for the collect(...) methods. Specifically, the collectData(...) method of AbstractPlugin.java can often simply be called by the collect(...) methods. However, more advanced plugins that handle very specific needs may require these methods to be overridden and implemented directly, not relying on default behavior. Generally, these cases are rare and only occur when a plugin isn't simply collecting files but rather needs to run some Java process or invoke some separate operation that does processing which results in a file that then needs to be collected. There are plugins in the com.ptc.customersupport.plugin.* packages that do this which can be examined for examples, specifically, see MBeanDumpPlugin.java, WDSPlugin.java and AbstractWinduPlugin.java. A sample collect(...) method implementation would be:- Specified by:
collectin interfacePluginMBean- Parameters:
topicIdentifier- This is a String representation of a directory used as a location to collect plugin data to. This value should not need to be modified by the collect(...)method implementation.maxAgeInDays- A long value that is a starting time value for if files are collected with respect to time. This value should not need to be modified by the collect(...) method implementation.minAgeInDays- A long value that is an ending time value for if files are collected with respect to time. This value should not need to be modified by the collect(...) method implementation.pathTimeStamp- A String representation of a directory timestamp used as a name which plugins collect their data to. This value should not need to be modified by the collect(...) method implementation.- Returns:
- Mapinvalid input: '<'String,Object> The return type is a Map that contains
an inner Map. Mapinvalid input: '<'String,
Mapinvalid input: '<'String, String>>. The "inner"
Mapinvalid input: '<'String, String> is a Map that contains
the plugin execution status. The outer
Mapinvalid input: '<'String, Object> is a Map that contains
which server the plugin executed on. This
allows the plugin framework to report
information across the cluster for each
plugin executed.
Supported API: true
-