Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 7 Monitoring the Adapter Using TIBCO Hawk : Available Microagents

Available Microagents
Each adapter has two microagents, a standard TIBCO Hawk microagent named COM.TIBCO.ADAPTER.xyz (where xyz is the adapter configuration name) and a class microagent. These microagents provide:
Business level statistics that report the progress of the adapter as it interacts with the database. For example, in a database adapter, such statistics might indicate whether objects were successfully or unsuccessfully inserted, updated, or deleted in the database.
Queries that return information about the state of the adapter. This can be an important tool for seeing the internals of an adapter and debugging it if something appears wrong. For example, methods can return information about threads, internal queues, or connections to the target system. Using these methods, one might be able to identify bottlenecks or gauge how successfully an adapter is scaling with respect to the current environment.
Updates of the adapter runtime parameters. This includes retrieving the current runtime parameters and setting new runtime parameters without restarting the adapter. An example of this is getting and setting the polling interval. Updating a runtime parameter through the Hawk microagent only affects the setting of the instance that is running. It does not permanently change the setting in either the repository or the .tra file.
The following table lists each method available for the adapter and the page on which the method is explained. Although the Microagents, Methods, and Arguments dialog in TIBCO Hawk Display lists more methods than are documented here, only the following methods are supported.
Returns information about the publisher, subscriber, and IODescriptor.
Returns basic configuration information. More specific information is accessed by more specific methods.
Returns the current count of elements in any internal queue used by the adapter.
Returns general status information, such as the number of TIBCO Rendezvous messages received and published, the number of errors since the last call, the PID of the application, and more.
Returns the configuration ID, application name, version, and date for this adapter instance.
Returns information retrieved from the ledger file of a certified messaging session for a publisher adapter.
activateTraceRole()
Activates mapping of a role to a sink at runtime. This replaces the now-deprecated setTraceSink() TIBCO Hawk method.
 
Input Parameters
deactivateTraceRole()
Deactivates a mapping of a roles to sinks at runtime.
 
Input Parameters
getActivityStatisticsByService()
Returns statistics about data handled by a given adapter service or all adapter services since the time the adapter was started.
 
Input parameter
Name of service to get statistics for. If no service name is given, performance statistics for all services are returned.
 
Displays the time (in seconds) since last time the adapter was reset, or if never reset, since the adapter started.
Concatenated string of Service Name and Operation separated by a comma.
getAdapterServiceInformation()
Returns information about services implemented by this adapter.
 
 
Number of Messages
getComponents()
Returns information about currently active TIBCO Hawk components such as publishers, subscribers, or timers.
Any of Publisher, Subscriber, Timer, or IODescriptor. The default value is All.
 
The name of the TIBCO Adapter SDK class for this component, such as Publisher, Subscriber, or IODescriptorSource. For more information about the class, see your TIBCO Adapter SDK documentation.
Information about this component, for example, time interval, signal type, and validating the publisher or subscriber.
getConfig()
Retrieves generic configuration information. More specific configuration information is accessed through separate methods.
Repository Connection
getConfigProperties()
Returns all attributes and elements for the given repository object.
Name of the property for which elements (tags) and attributes are desired. For example, agentone/startup.
 
getConnectionStatistics()
Returns the state and statistics for all current connections used by the adapter.
Displays the time (in seconds) since the last time the adapter was reset, or if never reset, since the adapter started.
getHostInformation()
Returns standard and extended application information set. It returns the following information.
 
getQueueStatistics()
Return the current count of elements in any internal queue used by the adapter. This includes the TIBCO Rendezvous event queues automatically spawned by TIBCO Rendezvous for each adapter.
 
Displays the time (in seconds) since the last time the adapter was reset, or if never reset, since the adapter started.
getRvConfig()
Returns information about the TIBCO Rendezvous session defined by this adapter. Information about all currently defined sessions is returned if no sessionName is provided.
Input Parameter
Name of the TIBCO Rendezvous session for which configuration is required. If not given, information about all sessions is returned. The default is all.
 
Returns 1 if this is a synchronous session, 0 otherwise.
Type of session; one of M_RV, M_RVCM, or M_RVCMQ.
Ledger file for this certified messaging session. Returns the empty string for sessions that are not certified messaging sessions.
Timeout for this certified messaging session. Returns the empty string for sessions that are not certified messaging sessions.
getStatus()
Retrieves basic status information about the adapter.
This information is fairly limited; for more detail, additional methods are provided (getConfig() and getRvConfig().)
getThreadStatistics()
Return the operation counts of the current threads.
Type that tells what part of the adapter this thread belongs to. Valid types include "Publisher", "Subscriber", "RPC", or "Connection".
Displays the time (in seconds) since last time the adapter was reset, or if never reset, since the adapter started.
getTraceSinks()
Returns information about sinks to which traces currently go.
Input Parameters
Name of the sink for which you need information. If no name is specified, information about all sinks is returned. Default is all.
Name of the role for which you need information for the specified sink or sinks. Default is all.
 
getVersion()
Retrieves version information for the current application. Two lines may be returned, one for the TIBCO Adapter SDK, one for the adapter.
_onUnsolictedMsg()
Displays all alert messages sent from the adapter or an error if not successful.
preRegisterListener()
Preregister an anticipated subscription service. Some sending applications can anticipate requests for certified delivery even before the listening applications start running. In such situations, the publication service can preregister subscription services, so TIBCO Rendezvous software begins storing outbound messages in the publication service ledger. If the listening correspondent requires old messages, it receives the backlogged messages when it requests certified delivery.
 
Input Parameters
Returns OK if the subscription service was preregistered successfully, false otherwise.
resetActivityStatistics()
Resets all the counts for the activity statistics and when getActivityStatistics() is invoked, default values are displayed.
resetConnectionStatistics()
Resets all the counts for the connection statistics and when getActivityStatistics() is invoked, default values are displayed.
resetThreadStatistics()
Resets all the counts for the thread statistics and when getActivityStatistics() is invoked, default values are displayed.
reviewLedger()
Returns information retrieved from the ledger file of a TIBCO Rendezvous certified messaging session.
Before invoking this method, ensure that the certified messaging publisher adapter has established a certified delivery agreement with its subscriber agents.
Input Parameters
Name of the TIBCO Rendezvous session for which ledger information is desired (default is all).
 
Total storage (in bytes) occupied by all pending messages with this subject name.
If the ledger contains ten messages with this subject name, this field sums the storage space over all of them.
Within each listener submessage, the Listener Session Name field contains the name of the delivery-tracking listener session.
Within each listener submessage, the Last Confirmed field contains the sequence number of the last message for which this listener session confirmed delivery.
Number of RVCM messages pending for this listener. The value is computed by subtracting the last sent sequence number from the last acknowledged sequence number.
setDebugLevel()
Sets the debug level for the current adapter instance.
Input Parameter
Returns OK if successful or an error if not successful.
setTraceSinks()
Adds a role or changes the file limit of a previously specified sink.
Input Parameters
Name of the role you want to add to this sink (warning, error, debug, or user defined). Default is all.
Returns OK if successful or an error if not successful.
stopApplicationInstance()
Stops the specified adapter by calling the internal stop() method. This method returns OK if successful or an error if not successful.
In some cases, a "Method Invocation Succeeded" message appears, but the adapter does not return control to the command line.
If the com.csgsystems.aruba.connection.PoolableATMI.cleanup property is set to true in pools.properties, there will be a separate thread to do some cleanup for the Kenan connection pool. If this thread is not closed while shutting down adapter, then when invoking the stopApplicationInstance method using TIBCO Hawk, the adapter does not return control to command line.
If the com.csgsystems.aruba.connection.PoolableATMI.cleanup property is set to false, the adapter can stop and return control to command line successfully.
unRegisterListener()
Unregister a currently preregistered subscription service.
Input Parameters
Name of the publication service to which the subscription service is preregistered.
This method returns true if the subscription service was unregistered successfully, false otherwise.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved