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

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

public class CIBServicePerfStatsImpl
extends CIBPerfStatsImpl
implements CIBServicePerfStats

Provides a default implementation for a CIBServicePerfStats provider 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
CIBServicePerfStatsImpl(javax.management.MBeanServerConnection connection, java.util.Map map)
          Builds a CIBServicePerfstats provider which uses the MBeanServerConnection to connect the CP and a map providing the mapping between the Java-ES Framework and the CP meaning the mapping between the CIB attributes and the CP's ObjectNames.
CIBServicePerfStatsImpl(javax.management.MBeanServerConnection connection, javax.management.ObjectName name)
          Builds a CIBServicePerfstats provider which uses the MBeanServerConnection to connect the CP and the name as the ObjectName to get attributes from the CP's JMX MBeanServer.
CIBServicePerfStatsImpl(javax.management.MBeanServerConnection connection, java.lang.String name)
          Builds a CIBServicePerfstats provider which uses the MBeanServerConnection to connect the CP and the name as the key value of the name's key of the ObjectName to get attributes from the CP's JMX MBeanServer.
 
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)
          fromCompositeData
 CIBCountStatistic getAbortedRequests()
          Returns a CIBCountStatistic representing the number of Aborted Requests
 CIBCountStatistic getFailedRequests()
          Returns a CIBValueStatistic representing the number of failed requests
 CIBCountStatistic getInRequests()
          Returns a CIBCountStatistic representing the number of In Requests
 CIBCountStatistic getOutRequests()
          Returns a CIBCountStatistic representing the number of Out Requests
 CIBRangeStatistic getOutstandingRequests()
          Returns a CIBRangeStatistic representing the Outstanding Requests statistics The current value is (NbInRequests-(NbOutRequests+NbFailedRequests+NbAbortedRequests)) The processing does not take into account the number of Abort requests
 CIBTimeStatistic getResidentTime()
          Returns a CIBTimeStatistic object representing the Resident time.
 CIBTimeStatistic getServiceTime()
          Returns a CIBTimeStatistic object representing the Service Time
 void init()
          Initializes the statistics mechanism.
 void start()
          Start the statistics collections and clean the statistics objects/values when needed, close all the communications.
 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

CIBServicePerfStatsImpl

public CIBServicePerfStatsImpl(javax.management.MBeanServerConnection connection,
                               java.lang.String name)
                        throws javax.management.MalformedObjectNameException
Builds a CIBServicePerfstats provider which uses the MBeanServerConnection to connect the CP and the name as the key value of the name's key of the ObjectName to get attributes from the CP's JMX MBeanServer.

Parameters:
connection - MBeanServerConnection
name - String
Throws:
javax.management.MalformedObjectNameException

CIBServicePerfStatsImpl

public CIBServicePerfStatsImpl(javax.management.MBeanServerConnection connection,
                               javax.management.ObjectName name)
                        throws javax.management.MalformedObjectNameException
Builds a CIBServicePerfstats provider which uses the MBeanServerConnection to connect the CP and the name as the ObjectName to get attributes from the CP's JMX MBeanServer.

Parameters:
connection - MBeanServerConnection
name - ObjectName
Throws:
javax.management.MalformedObjectNameException

CIBServicePerfStatsImpl

public CIBServicePerfStatsImpl(javax.management.MBeanServerConnection connection,
                               java.util.Map map)
Builds a CIBServicePerfstats provider which uses the MBeanServerConnection to connect the CP and a map providing the mapping between the Java-ES Framework and the CP meaning the mapping between the CIB attributes and the CP's ObjectNames.

Parameters:
connection - MBeanServerConnection
map - Map
Method Detail

getResidentTime

public CIBTimeStatistic getResidentTime()
                                 throws CIBIOException,
                                        CIBAttributeNotFoundException
Returns a CIBTimeStatistic object representing the Resident time.

Specified by:
getResidentTime in interface CIBServicePerfStats
Returns:
com.sun.mfwk.cib.statistics.CIBTimeStatistic
Throws:
CIBIOException
CIBAttributeNotFoundException

getServiceTime

public CIBTimeStatistic getServiceTime()
                                throws CIBIOException,
                                       CIBAttributeNotFoundException
Returns a CIBTimeStatistic object representing the Service Time

Specified by:
getServiceTime in interface CIBServicePerfStats
Returns:
com.sun.mfwk.cib.statistics.CIBTimeStatistic
Throws:
CIBIOException
CIBAttributeNotFoundException

getFailedRequests

public CIBCountStatistic getFailedRequests()
                                    throws CIBIOException,
                                           CIBAttributeNotFoundException
Returns a CIBValueStatistic representing the number of failed requests

Specified by:
getFailedRequests in interface CIBServicePerfStats
Returns:
com.sun.mfwk.cib.statistics.CIBCountStatistic
Throws:
CIBIOException
CIBAttributeNotFoundException

getOutstandingRequests

public CIBRangeStatistic getOutstandingRequests()
                                         throws CIBIOException,
                                                CIBAttributeNotFoundException
Returns a CIBRangeStatistic representing the Outstanding Requests statistics The current value is (NbInRequests-(NbOutRequests+NbFailedRequests+NbAbortedRequests)) The processing does not take into account the number of Abort requests

Specified by:
getOutstandingRequests in interface CIBServicePerfStats
Returns:
com.sun.mfwk.cib.statistics.CIBRangeStatistic
Throws:
CIBIOException
CIBAttributeNotFoundException

getInRequests

public CIBCountStatistic getInRequests()
                                throws CIBIOException,
                                       CIBAttributeNotFoundException
Returns a CIBCountStatistic representing the number of In Requests

Specified by:
getInRequests in interface CIBServicePerfStats
Returns:
com.sun.mfwk.cib.statistics.CIBCountStatistic
Throws:
CIBIOException
CIBAttributeNotFoundException

getOutRequests

public CIBCountStatistic getOutRequests()
                                 throws CIBIOException,
                                        CIBAttributeNotFoundException
Returns a CIBCountStatistic representing the number of Out Requests

Specified by:
getOutRequests in interface CIBServicePerfStats
Returns:
com.sun.mfwk.cib.statistics.CIBCountStatistic
Throws:
CIBIOException
CIBAttributeNotFoundException

getAbortedRequests

public CIBCountStatistic getAbortedRequests()
                                     throws CIBIOException,
                                            CIBAttributeNotFoundException
Returns a CIBCountStatistic representing the number of Aborted Requests

Returns:
com.sun.mfwk.cib.statistics.CIBCountStatistic
Throws:
CIBIOException
CIBAttributeNotFoundException

init

public void init()
          throws CIBIOException,
                 CIBException
Initializes 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 statistics collections and clean the statistics objects/values when needed, close all the communications.

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)
fromCompositeData

Specified by:
fromCompositeData in interface CIBStats
Parameters:
data - CompositeData
Returns:
com.sun.mfwk.cib.statistics.CIBStats