com.sun.mfwk.cib.sdk.statistics
Class CIBExternalResourcePerfStatsImpl

java.lang.Object
  extended bycom.sun.mfwk.cib.sdk.statistics.CIBPerfStatsImpl
      extended bycom.sun.mfwk.cib.sdk.statistics.CIBExternalResourcePerfStatsImpl
All Implemented Interfaces:
CIBExternalResourcePerfStats, CIBPerfStats, CIBProvider, CIBStats, javax.management.j2ee.statistics.Stats

public class CIBExternalResourcePerfStatsImpl
extends CIBPerfStatsImpl
implements CIBExternalResourcePerfStats

Provides a default implementation of a CIBApplicationPerfStats provider for a CIBExternalResource. This implementation is fully based on the Java-ES MF Instrumentation SDK.


Field Summary
 
Fields inherited from interface com.sun.mfwk.cib.statistics.CIBStats
CIBStatsVersion
 
Constructor Summary
CIBExternalResourcePerfStatsImpl(javax.management.MBeanServerConnection connection, java.util.Map map)
           
CIBExternalResourcePerfStatsImpl(javax.management.MBeanServerConnection connection, javax.management.ObjectName name)
           
CIBExternalResourcePerfStatsImpl(javax.management.MBeanServerConnection connection, java.lang.String name)
           
 
Method Summary
 void destroy()
          destroy the statistics and clean the statistics objects/values when needed, close all the communications.
 CIBStats fromCompositeData(javax.management.openmbean.CompositeData data)
          Returns a CIBStats object from a composite data
 CIBValueStatistic getAccumulatedOutboundAssociations()
          Returns a Statistic representing the total number of associations to the application entity since application initialization, where it was the initiator.
 CIBValueStatistic getFailedOutboundAssociations()
          Returns a Statistic representing the total number associations where the application entity is initiator and association establishment has failed, since application initialization.
 CIBValueStatistic getFailedQueries()
          Returns a Statistic object containing the number of failed queries
 CIBValueStatistic getLastOutboundActivity()
          Returns a Statistic representing the value of sysUpTime at the time this application last had an outbound association.
 CIBValueStatistic getOutboundAssociations()
          Return a Statistic representing the number of current associations to the network service application, where it is the initiator.
 CIBTimeStatistic getQueriesTime()
          Returns a Statistic object representing the time for queries
 void init()
          Initialize the statistics mechanism.
 void start()
          Start the monitoring
 void stop()
          Stop the statistics collections and clean the statistics objects/values when needed, close all the communications.
 javax.management.openmbean.CompositeData toCompositeData()
          toCompositeData
 
Methods inherited from class com.sun.mfwk.cib.sdk.statistics.CIBPerfStatsImpl
getStatistic, getStatisticNames, getStatistics
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.management.j2ee.statistics.Stats
getStatistic, getStatisticNames, getStatistics
 

Constructor Detail

CIBExternalResourcePerfStatsImpl

public CIBExternalResourcePerfStatsImpl(javax.management.MBeanServerConnection connection,
                                        java.lang.String name)

CIBExternalResourcePerfStatsImpl

public CIBExternalResourcePerfStatsImpl(javax.management.MBeanServerConnection connection,
                                        javax.management.ObjectName name)

CIBExternalResourcePerfStatsImpl

public CIBExternalResourcePerfStatsImpl(javax.management.MBeanServerConnection connection,
                                        java.util.Map map)
Method Detail

getAccumulatedOutboundAssociations

public CIBValueStatistic getAccumulatedOutboundAssociations()
                                                     throws CIBIOException,
                                                            CIBAttributeNotFoundException
Returns a Statistic representing the total number of associations to the application entity since application initialization, where it was the initiator.

Specified by:
getAccumulatedOutboundAssociations in interface CIBExternalResourcePerfStats
Returns:
CIBValueStatistic
Throws:
CIBIOException
CIBAttributeNotFoundException

getFailedOutboundAssociations

public CIBValueStatistic getFailedOutboundAssociations()
                                                throws CIBIOException,
                                                       CIBAttributeNotFoundException
Returns a Statistic representing the total number associations where the application entity is initiator and association establishment has failed, since application initialization. Failed associations are not counted in the accumulated association totals."

Specified by:
getFailedOutboundAssociations in interface CIBExternalResourcePerfStats
Returns:
CIBValueStatistic
Throws:
CIBAttributeNotFoundException
CIBIOException

getOutboundAssociations

public CIBValueStatistic getOutboundAssociations()
                                          throws CIBIOException,
                                                 CIBAttributeNotFoundException
Return a Statistic representing the number of current associations to the network service application, where it is the initiator. An outbound association occurs when this application successfully connects to another one.

Specified by:
getOutboundAssociations in interface CIBExternalResourcePerfStats
Returns:
CIBValueStatistic
Throws:
CIBIOException
CIBAttributeNotFoundException

getLastOutboundActivity

public CIBValueStatistic getLastOutboundActivity()
                                          throws CIBIOException,
                                                 CIBAttributeNotFoundException
Returns a Statistic representing the value of sysUpTime at the time this application last had an outbound association.

Specified by:
getLastOutboundActivity in interface CIBExternalResourcePerfStats
Returns:
CIBValueStatistic
Throws:
CIBIOException
CIBAttributeNotFoundException

getQueriesTime

public CIBTimeStatistic getQueriesTime()
                                throws CIBIOException,
                                       CIBAttributeNotFoundException
Returns a Statistic object representing the time for queries

Specified by:
getQueriesTime in interface CIBExternalResourcePerfStats
Returns:
CIBTimeStatistic
Throws:
CIBAttributeNotFoundException
CIBIOException

getFailedQueries

public CIBValueStatistic getFailedQueries()
                                   throws CIBIOException,
                                          CIBAttributeNotFoundException
Returns a Statistic object containing the number of failed queries

Specified by:
getFailedQueries in interface CIBExternalResourcePerfStats
Returns:
CIBValueStatistic
Throws:
CIBIOException
CIBAttributeNotFoundException

init

public void init()
          throws CIBIOException,
                 CIBException
Initialize the statistics mechanism. In particular, initialize the communication to the instrumentation layer.

Specified by:
init in interface CIBProvider
Overrides:
init in class CIBPerfStatsImpl
Throws:
CIBIOException
CIBException

destroy

public void destroy()
             throws CIBIOException,
                    CIBException
destroy the statistics and clean the statistics objects/values when needed, close all the communications.

Specified by:
destroy in interface CIBProvider
Overrides:
destroy in class CIBPerfStatsImpl
Throws:
CIBIOException
CIBException

start

public void start()
           throws CIBIOException,
                  CIBException
Start the monitoring

Throws:
CIBIOException
CIBException

stop

public void stop()
          throws CIBIOException,
                 CIBException
Stop the statistics collections and clean the statistics objects/values when needed, close all the communications.

Throws:
CIBIOException
CIBException

toCompositeData

public javax.management.openmbean.CompositeData toCompositeData()
                                                         throws javax.management.openmbean.OpenDataException
toCompositeData

Specified by:
toCompositeData in interface CIBStats
Returns:
CompositeData
Throws:
javax.management.openmbean.OpenDataException

fromCompositeData

public CIBStats fromCompositeData(javax.management.openmbean.CompositeData data)
Returns a CIBStats object from a composite data

Specified by:
fromCompositeData in interface CIBStats
Parameters:
data - CompositeData
Returns:
CIBStats