com.bea.wli.monitoring
Class ServiceResourceStatistic

java.lang.Object
  extended by com.bea.wli.monitoring.ServiceResourceStatistic
All Implemented Interfaces:
Serializable

public final class ServiceResourceStatistic
extends Object
implements Serializable

This class contains statistical information for all resources of business or proxy service.

See Also:
Serialized Form

Constructor Summary
ServiceResourceStatistic(Ref serviceRef, Exception exception)
          Constructor
ServiceResourceStatistic(Ref serviceRef, HashMap<ResourceType,ResourceStatistic[]> resourceStatisticMap, long collectionTimestamp)
          Constructor
 
Method Summary
 ResourceStatistic[] getAllResourceStatistics()
          Gets statistics for all resources.
 long getCollectionTimestamp()
          Gets the time the statistics were collected from the cluster.
 ResourceStatistic[] getResourceStatisticsByType(ResourceType type)
          Gets statistics for all resources of specified type.
 Ref getServiceRef()
          Gets reference of service of which statistical information is available in this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceResourceStatistic

public ServiceResourceStatistic(Ref serviceRef,
                                HashMap<ResourceType,ResourceStatistic[]> resourceStatisticMap,
                                long collectionTimestamp)
                         throws IllegalArgumentException
Constructor

Parameters:
serviceRef -
resourceStatisticMap -
collectionTimestamp -
Throws:
IllegalArgumentException

ServiceResourceStatistic

public ServiceResourceStatistic(Ref serviceRef,
                                Exception exception)
                         throws IllegalArgumentException
Constructor

Parameters:
serviceRef -
exception -
Throws:
IllegalArgumentException
Method Detail

getServiceRef

public Ref getServiceRef()
Gets reference of service of which statistical information is available in this object.

Returns:
Service reference.

getCollectionTimestamp

public long getCollectionTimestamp()
Gets the time the statistics were collected from the cluster. Time (actual time from Admin Server) when this statistic was collected.

Returns:
Collection timestamp in mSec.

getAllResourceStatistics

public ResourceStatistic[] getAllResourceStatistics()
                                             throws InvalidServiceRefException,
                                                    MonitoringNotEnabledException,
                                                    MonitoringException
Gets statistics for all resources.

Returns:
Statistics for all resources of requested types. If statistics for one or more type of resources (that were specified in the operation which returned this object) are not present in the returned statistics, it means this service does not have any resources of those types.
Throws:
InvalidServiceRefException - If service reference is invalid or service is deleted.
MonitoringNotEnabledException - If statistics not found.
MonitoringException - If operation fails.

getResourceStatisticsByType

public ResourceStatistic[] getResourceStatisticsByType(ResourceType type)
                                                throws InvalidServiceRefException,
                                                       MonitoringNotEnabledException,
                                                       MonitoringException
Gets statistics for all resources of specified type.

Parameters:
type - Resource type.
Returns:
Statistics for all resources of specified type. Null will be returned in following two situations: 1. This service doen not have any resource of the specified type. 2. Statistics for specified type were not requested in the operation that returned this object.
Throws:
InvalidServiceRefException - If service reference is invalid or service is deleted.
MonitoringNotEnabledException - If statistics not found.
MonitoringException - If operation fails.