org.ow2.petals.binding.soap.monitoring
Class Monitoring

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.ow2.petals.binding.soap.monitoring.Monitoring
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, MonitoringMBean

public class Monitoring
extends NotificationBroadcasterSupport
implements MonitoringMBean

The monitoring MBean of the BC SOAP

Author:
Christophe DENEUX (PetalsLink)

Constructor Summary
Monitoring(Timer responseTimeProbesTimer, long samplePeriod)
          Creates the monitoring MBean
 
Method Summary
 Map<String[],Long> getHttpRequestsCount()
          Returns the number of requests since the last start.
 Map<String,Long> getHttpRequestsCount(String webService)
          The number of requests for each execution status of the specified web-service webService whatever the web-service client.
 Map<String,Long> getHttpRequestsCount(String webService, String webServiceClient)
          The number of requests for each execution status of the specified web-service webService and specified web-service-client webServiceClient.
 Map<String[],Long[]> getHttpRequestsResponseTimeAbs()
          Returns the response time values since the last start.
 Map<String,Long> getHttpRequestsResponseTimeAbs(String webService)
          Returns the response time values since the last start of the succeeded execution of the specified web-service webService whatever the web-service client.
 Map<String[],Long[]> getHttpRequestsResponseTimeRel()
          Returns the response time values on a time sample.
 Map<String,Long> getHttpRequestsResponseTimeRel(String webService)
          Returns the response time values son a time sample of the succeeded execution of the specified web-service webService whatever the web-service client.
 int getHttpServerThreadPoolAllocatedThreadsCurrent()
           
 int getHttpServerThreadPoolAllocatedThreadsMax()
           
 int getHttpServerThreadPoolIdleThreadsCurrent()
           
 int getHttpServerThreadPoolIdleThreadsMax()
           
 int getHttpServerThreadPoolMaxSize()
           
 int getHttpServerThreadPoolMinSize()
           
 int getHttpServerThreadPoolQueuedRequestsCurrent()
           
 int getHttpServerThreadPoolQueuedRequestsMax()
           
 long getInformationURLsCounter()
           
 MBeanNotificationInfo[] getNotificationInfo()
           
 org.ow2.petals.probes.KeyedCounterProbeWithExecutionStatus<IncomingServiceKey> getProbeHttpRequestsInvocationsCount()
           
 org.ow2.petals.probes.KeyedResponseTimeProbe<IncomingServiceKey> getProbeHttpRequestsInvocationsResponseTime()
           
 org.ow2.petals.probes.GaugeProbe<Integer,Integer> getProbeHttpServerThreadPoolAllocatedThreads()
           
 org.ow2.petals.probes.GaugeProbe<Integer,Integer> getProbeHttpServerThreadPoolIdleThreads()
           
 org.ow2.petals.probes.GaugeProbe<Integer,Integer> getProbeHttpServerThreadPoolQueuedRequests()
           
 org.ow2.petals.probes.CounterProbe getProbeInformationServlet()
           
 org.ow2.petals.probes.CounterProbe getProbeUnknownServlet()
           
 org.ow2.petals.probes.KeyedResponseTimeProbe<ServiceClientKey> getProbeWsClientInvocationsResponseTime()
           
 org.ow2.petals.probes.KeyedGaugeProbe<ServiceClientKey,Integer,Integer> getProbeWsClientPoolClientsInUse()
           
 org.ow2.petals.probes.KeyedCounterProbe<ServiceClientKey> getProbeWsClientPoolExhaustions()
           
 org.ow2.petals.probes.KeyedCounterProbeWithExecutionStatus<ServiceClientKey> getProbeWsRequestsInvocationsCount()
           
 long getUnknownURLsCounter()
           
 Map<String[],Long[]> getWsClientInvocationsResponseTimeAbs()
          Returns the response time values since the last start.
 Map<String[],Long[]> getWsClientInvocationsResponseTimeRel()
          Returns the response time values on a time sample.
 Map<String,Long> getWsClientPool(String webService)
           
 Map<String[],Integer> getWsClientPoolClientsInUseCurrent()
           
 Map<String[],Integer> getWsClientPoolClientsInUseMax()
           
 Map<String[],Long> getWsClientPoolExhaustions()
           
 Map<String,Long> getWsRequestsCount(String webServiceURL)
          The number of requests for each execution status of the specified external web-service webServiceURL whatever the invoked operation and message pattern.
 void init(org.mortbay.thread.BoundedThreadPool httpThreadPool, Map<ServiceClientKey,org.apache.commons.pool.impl.GenericObjectPool<PetalsServiceClient>> wsClientPools)
          Initialize all probes of the monitoring MBean
 void notifyHTTPServerThreadPoolExhausted()
           
 void notifyServiceClientPoolExhausted(org.ow2.petals.probes.ProbeKey key)
           
 void shutdown()
          Shutdown all probes of the monitoring MBean
 void start()
          Start all probes of the monitoring MBean
 void stop()
          Stop all probes of the monitoring MBean
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Monitoring

public Monitoring(Timer responseTimeProbesTimer,
                  long samplePeriod)
Creates the monitoring MBean

Parameters:
responseTimeProbesTimer - The timer used as sampler by response time probes. The caller is responsible to cancel the timer to free resources attached.
samplePeriod - The duration of a sample, in milliseconds.
Method Detail

init

public void init(org.mortbay.thread.BoundedThreadPool httpThreadPool,
                 Map<ServiceClientKey,org.apache.commons.pool.impl.GenericObjectPool<PetalsServiceClient>> wsClientPools)
          throws org.ow2.petals.probes.exceptions.ProbeInitializedException,
                 org.ow2.petals.probes.exceptions.ProbeStartedException,
                 org.ow2.petals.probes.exceptions.ProbeInitializationException
Initialize all probes of the monitoring MBean

Parameters:
httpThreadPool - The thread pool of the HTTP server
wsClientPools - The pools of service clients used to call external web services.
Throws:
org.ow2.petals.probes.exceptions.ProbeInitializedException
org.ow2.petals.probes.exceptions.ProbeStartedException
org.ow2.petals.probes.exceptions.ProbeInitializationException

start

public void start()
           throws org.ow2.petals.probes.exceptions.ProbeException
Start all probes of the monitoring MBean

Throws:
org.ow2.petals.probes.exceptions.ProbeException

stop

public void stop()
          throws org.ow2.petals.probes.exceptions.ProbeException
Stop all probes of the monitoring MBean

Throws:
org.ow2.petals.probes.exceptions.ProbeException

shutdown

public void shutdown()
              throws org.ow2.petals.probes.exceptions.ProbeException
Shutdown all probes of the monitoring MBean

Throws:
org.ow2.petals.probes.exceptions.ProbeException

getNotificationInfo

public MBeanNotificationInfo[] getNotificationInfo()
Specified by:
getNotificationInfo in interface NotificationBroadcaster
Overrides:
getNotificationInfo in class NotificationBroadcasterSupport

notifyHTTPServerThreadPoolExhausted

public final void notifyHTTPServerThreadPoolExhausted()

notifyServiceClientPoolExhausted

public final void notifyServiceClientPoolExhausted(org.ow2.petals.probes.ProbeKey key)

getProbeHttpServerThreadPoolAllocatedThreads

public final org.ow2.petals.probes.GaugeProbe<Integer,Integer> getProbeHttpServerThreadPoolAllocatedThreads()
Returns:
The probe counting allocated threads in the thread pool of the HTTP server.

getProbeHttpServerThreadPoolIdleThreads

public final org.ow2.petals.probes.GaugeProbe<Integer,Integer> getProbeHttpServerThreadPoolIdleThreads()
Returns:
The probe counting idle threads in the thread pool of the HTTP server.

getProbeHttpServerThreadPoolQueuedRequests

public final org.ow2.petals.probes.GaugeProbe<Integer,Integer> getProbeHttpServerThreadPoolQueuedRequests()
Returns:
The probe counting requests in the queue of the thread pool of the HTTP server.

getProbeUnknownServlet

public final org.ow2.petals.probes.CounterProbe getProbeUnknownServlet()
Returns:
The probe counting unknown URLs received by the Jetty server.

getProbeInformationServlet

public final org.ow2.petals.probes.CounterProbe getProbeInformationServlet()
Returns:
The probe counting unknown URLs received by the Jetty server.

getProbeHttpRequestsInvocationsCount

public final org.ow2.petals.probes.KeyedCounterProbeWithExecutionStatus<IncomingServiceKey> getProbeHttpRequestsInvocationsCount()
Returns:
The probe counting service invocation by web-service, web-service client and execution status, received by the Jetty server.

getProbeHttpRequestsInvocationsResponseTime

public final org.ow2.petals.probes.KeyedResponseTimeProbe<IncomingServiceKey> getProbeHttpRequestsInvocationsResponseTime()
Returns:
The probe measuring the response time of service invocation by web-service, web-service client and execution status, received by the Jetty server.

getProbeWsClientInvocationsResponseTime

public final org.ow2.petals.probes.KeyedResponseTimeProbe<ServiceClientKey> getProbeWsClientInvocationsResponseTime()
Returns:
The probe measuring the response time of WS client invocation by external web-service, operation, MEP and execution status.

getProbeWsClientPoolClientsInUse

public final org.ow2.petals.probes.KeyedGaugeProbe<ServiceClientKey,Integer,Integer> getProbeWsClientPoolClientsInUse()
Returns:
The probe counting allocated ws-clients in the pool.

getProbeWsClientPoolExhaustions

public final org.ow2.petals.probes.KeyedCounterProbe<ServiceClientKey> getProbeWsClientPoolExhaustions()
Returns:
The probe counting the number of ws-client pool exhaustions.

getProbeWsRequestsInvocationsCount

public final org.ow2.petals.probes.KeyedCounterProbeWithExecutionStatus<ServiceClientKey> getProbeWsRequestsInvocationsCount()
Returns:
The probe counting external web-service invocation by web-service, web-service operation and MEP.

getHttpServerThreadPoolMaxSize

public int getHttpServerThreadPoolMaxSize()
Specified by:
getHttpServerThreadPoolMaxSize in interface MonitoringMBean

getHttpServerThreadPoolMinSize

public int getHttpServerThreadPoolMinSize()
Specified by:
getHttpServerThreadPoolMinSize in interface MonitoringMBean

getHttpServerThreadPoolAllocatedThreadsMax

public int getHttpServerThreadPoolAllocatedThreadsMax()
                                               throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Specified by:
getHttpServerThreadPoolAllocatedThreadsMax in interface MonitoringMBean
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getHttpServerThreadPoolAllocatedThreadsCurrent

public int getHttpServerThreadPoolAllocatedThreadsCurrent()
                                                   throws org.ow2.petals.probes.exceptions.ProbeNotStartedException
Specified by:
getHttpServerThreadPoolAllocatedThreadsCurrent in interface MonitoringMBean
Throws:
org.ow2.petals.probes.exceptions.ProbeNotStartedException

getHttpServerThreadPoolIdleThreadsMax

public int getHttpServerThreadPoolIdleThreadsMax()
                                          throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Specified by:
getHttpServerThreadPoolIdleThreadsMax in interface MonitoringMBean
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getHttpServerThreadPoolIdleThreadsCurrent

public int getHttpServerThreadPoolIdleThreadsCurrent()
                                              throws org.ow2.petals.probes.exceptions.ProbeNotStartedException
Specified by:
getHttpServerThreadPoolIdleThreadsCurrent in interface MonitoringMBean
Throws:
org.ow2.petals.probes.exceptions.ProbeNotStartedException

getHttpServerThreadPoolQueuedRequestsMax

public int getHttpServerThreadPoolQueuedRequestsMax()
                                             throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Specified by:
getHttpServerThreadPoolQueuedRequestsMax in interface MonitoringMBean
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getHttpServerThreadPoolQueuedRequestsCurrent

public int getHttpServerThreadPoolQueuedRequestsCurrent()
                                                 throws org.ow2.petals.probes.exceptions.ProbeNotStartedException
Specified by:
getHttpServerThreadPoolQueuedRequestsCurrent in interface MonitoringMBean
Throws:
org.ow2.petals.probes.exceptions.ProbeNotStartedException

getUnknownURLsCounter

public long getUnknownURLsCounter()
                           throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Specified by:
getUnknownURLsCounter in interface MonitoringMBean
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getInformationURLsCounter

public long getInformationURLsCounter()
                               throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Specified by:
getInformationURLsCounter in interface MonitoringMBean
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getWsClientPoolClientsInUseMax

public Map<String[],Integer> getWsClientPoolClientsInUseMax()
                                                     throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Specified by:
getWsClientPoolClientsInUseMax in interface MonitoringMBean
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getWsClientPoolClientsInUseCurrent

public Map<String[],Integer> getWsClientPoolClientsInUseCurrent()
                                                         throws org.ow2.petals.probes.exceptions.ProbeNotStartedException
Specified by:
getWsClientPoolClientsInUseCurrent in interface MonitoringMBean
Throws:
org.ow2.petals.probes.exceptions.ProbeNotStartedException

getWsClientPoolExhaustions

public Map<String[],Long> getWsClientPoolExhaustions()
                                              throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Specified by:
getWsClientPoolExhaustions in interface MonitoringMBean
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getHttpRequestsCount

public Map<String[],Long> getHttpRequestsCount()
                                        throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Description copied from interface: MonitoringMBean
Returns the number of requests since the last start. The map key is structured as a String array where: Each value of the map entry is the number of requests associated to the map entry key.

Specified by:
getHttpRequestsCount in interface MonitoringMBean
Returns:
The number of requests for all web-services.
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getHttpRequestsCount

public Map<String,Long> getHttpRequestsCount(String webService)
                                      throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Description copied from interface: MonitoringMBean
The number of requests for each execution status of the specified web-service webService whatever the web-service client.

Specified by:
getHttpRequestsCount in interface MonitoringMBean
Parameters:
webService - The web-service for which the number of requests for each execution status must be returned. Not null.
Returns:
The number of requests for each execution status of the specified web-service webService. All execution status are contained in the map, even if set to 0. If webService is null, an empty map is returned.
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getHttpRequestsCount

public Map<String,Long> getHttpRequestsCount(String webService,
                                             String webServiceClient)
                                      throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Description copied from interface: MonitoringMBean
The number of requests for each execution status of the specified web-service webService and specified web-service-client webServiceClient.

Specified by:
getHttpRequestsCount in interface MonitoringMBean
Parameters:
webService - The web-service for which the number of requests for each execution status must be returned. Not null.
webServiceClient - The IP address of the web-service client for which the number of requests for each execution status must be returned. Not null.
Returns:
The number of requests for each execution status of the specified web-service webService and web-service client webServiceClient. All execution status are contained in the map, even if set to 0. If webService or webServiceClient is null, an empty map is returned.
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getHttpRequestsResponseTimeAbs

public Map<String[],Long[]> getHttpRequestsResponseTimeAbs()
                                                    throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Description copied from interface: MonitoringMBean
Returns the response time values since the last start. The map key is structured as a String array where:

getHttpRequestsResponseTimeAbs

public Map<String,Long> getHttpRequestsResponseTimeAbs(String webService)
                                                throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Description copied from interface: MonitoringMBean
Returns the response time values since the last start of the succeeded execution of the specified web-service webService whatever the web-service client. Each value of the map entry is an array of response times where:

Specified by:
getHttpRequestsResponseTimeAbs in interface MonitoringMBean
Parameters:
webService - The web-service for which the absolute response time values for each execution status must be returned. Not null.
Returns:
The absolute response time values for each succeeded execution of the specified web-service webService. All execution status are contained in the map, even if set to 0. If webService is null, an empty map is returned.
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getHttpRequestsResponseTimeRel

public Map<String[],Long[]> getHttpRequestsResponseTimeRel()
                                                    throws org.ow2.petals.probes.exceptions.ProbeNotStartedException
Description copied from interface: MonitoringMBean
Returns the response time values on a time sample. Each value of the map entry is an array of response times where:

Specified by:
getHttpRequestsResponseTimeRel in interface MonitoringMBean
Returns:
The response time values on a time sample.
Throws:
org.ow2.petals.probes.exceptions.ProbeNotStartedException

getHttpRequestsResponseTimeRel

public Map<String,Long> getHttpRequestsResponseTimeRel(String webService)
                                                throws org.ow2.petals.probes.exceptions.ProbeNotStartedException
Description copied from interface: MonitoringMBean
Returns the response time values son a time sample of the succeeded execution of the specified web-service webService whatever the web-service client. Each value of the map entry is an array of response times where:

Specified by:
getHttpRequestsResponseTimeRel in interface MonitoringMBean
Parameters:
webService - The web-service for which the absolute response time values for each execution status must be returned. Not null.
Returns:
The relative response time values for each succeeded execution of the specified web-service webService. All execution status are contained in the map, even if set to 0. If webService is null, an empty map is returned.
Throws:
org.ow2.petals.probes.exceptions.ProbeNotStartedException

getWsClientPool

public Map<String,Long> getWsClientPool(String webService)
                                 throws org.ow2.petals.probes.exceptions.ProbeNotStartedException,
                                        org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Specified by:
getWsClientPool in interface MonitoringMBean
Throws:
org.ow2.petals.probes.exceptions.ProbeNotStartedException
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getWsRequestsCount

public Map<String,Long> getWsRequestsCount(String webServiceURL)
                                    throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Description copied from interface: MonitoringMBean
The number of requests for each execution status of the specified external web-service webServiceURL whatever the invoked operation and message pattern.

Specified by:
getWsRequestsCount in interface MonitoringMBean
Parameters:
webServiceURL - The external web-service for which the number of requests for each execution status must be returned. Not null.
Returns:
The number of requests for each execution status of the specified external web-service webServiceURL. All execution status are contained in the map, even if set to 0. If webServiceURL is null, an empty map is returned.
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getWsClientInvocationsResponseTimeAbs

public Map<String[],Long[]> getWsClientInvocationsResponseTimeAbs()
                                                           throws org.ow2.petals.probes.exceptions.ProbeNotInitializedException
Description copied from interface: MonitoringMBean
Returns the response time values since the last start. The map key is structured as a String array where: Each value of the map entry is an array of response times where:

Specified by:
getWsClientInvocationsResponseTimeAbs in interface MonitoringMBean
Returns:
The absolute response time values.
Throws:
org.ow2.petals.probes.exceptions.ProbeNotInitializedException

getWsClientInvocationsResponseTimeRel

public Map<String[],Long[]> getWsClientInvocationsResponseTimeRel()
                                                           throws org.ow2.petals.probes.exceptions.ProbeNotStartedException
Description copied from interface: MonitoringMBean
Returns the response time values on a time sample. Each value of the map entry is an array of response times where:

Specified by:
getWsClientInvocationsResponseTimeRel in interface MonitoringMBean
Returns:
The response time values on a time sample.
Throws:
org.ow2.petals.probes.exceptions.ProbeNotStartedException


Copyright © 2005-2012 Petals Link (EBM Websourcing). All Rights Reserved.