org.ow2.petals.jmx
Class RouterMonitorServiceClient

java.lang.Object
  extended by org.ow2.petals.jmx.AbstractServiceClient
      extended by org.ow2.petals.jmx.RouterMonitorServiceClient

public class RouterMonitorServiceClient
extends AbstractServiceClient

Author:
rnaudin

Field Summary
 
Fields inherited from class org.ow2.petals.jmx.AbstractServiceClient
JMX_FIELD_NAME, JMX_FIELD_TYPE, JMX_SERVICE_TYPE, mbeanName, mBeanServerConnection, petalsDomain
 
Constructor Summary
RouterMonitorServiceClient(java.lang.String petalsDomain, javax.management.MBeanServerConnection mBeanServerConnection)
          Creates a new instance of RouterMonitorServiceClient
 
Method Summary
 void clearMonitorStorage()
          Clear the monitor storage.The persisted data related to the monitored exchanges are deleted.
 java.util.Map<java.lang.String,java.lang.String> getExchange(java.lang.String exchangeId)
          Get the exchange with the given exchange Id.
 java.util.Map<java.lang.String,java.lang.Long> getExchangeHistory(java.lang.String exchangeId)
          Get the history of the given exchange.
 java.util.List<java.lang.String> getExchangeIds(javax.xml.namespace.QName interfaceName, javax.xml.namespace.QName serviceName, java.lang.String endpointName, javax.xml.namespace.QName operationName, long startDate, long endDate)
          Get the list of exchange Ids that has been sent or received at least once, matching the given criteria and the exchange persistence duration
 java.util.List<java.lang.String> getExchangeIds(java.lang.String propertyKey, java.lang.String propertyValue)
          Get the list of exchange Ids that has been sent or received at least once, matching the given criteria and the exchange persistence duration
 int getExchanges(javax.xml.namespace.QName interfaceName, javax.xml.namespace.QName serviceName, java.lang.String endpointName, javax.xml.namespace.QName operationName, long startDate, long endDate)
          Get the number of exchange that has been sent or received at least once and matching the duration
 java.util.List<java.util.Map<java.lang.String,java.lang.String>> getMonitoredExchange()
          Get the list of Router Monitor filter.
 java.lang.Long getMonitorStorageDuration()
          Get the duration of the monitoring storage.
 void monitorExchanges(javax.xml.namespace.QName interfaceName, javax.xml.namespace.QName serviceName, java.lang.String endpointName, javax.xml.namespace.QName operationName, boolean storeExchanges)
          Activate the monitoring of the exchanges matching the given criteria.
 void setMonitorStorageDuration(long duration)
          Set the duration of the monitoring storage.
 void unmonitorExchanges(javax.xml.namespace.QName interfaceName, javax.xml.namespace.QName serviceName, java.lang.String endpointName, javax.xml.namespace.QName operationName)
          Deactivate the monitoring of the exchanges matching the given criteria.
 
Methods inherited from class org.ow2.petals.jmx.AbstractServiceClient
getAttribute, getAttribute, performAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RouterMonitorServiceClient

public RouterMonitorServiceClient(java.lang.String petalsDomain,
                                  javax.management.MBeanServerConnection mBeanServerConnection)
                           throws RouterMonitorServiceDoesNotExistException,
                                  RouterMonitorServiceErrorException
Creates a new instance of RouterMonitorServiceClient

Parameters:
petalsDomain -
mBeanServerConnection -
Throws:
RouterMonitorServiceDoesNotExistException
RouterMonitorServiceErrorException
Method Detail

clearMonitorStorage

public void clearMonitorStorage()
                         throws RouterMonitorServiceErrorException
Clear the monitor storage.The persisted data related to the monitored exchanges are deleted.

Throws:
RouterMonitorServiceErrorException

getExchange

public java.util.Map<java.lang.String,java.lang.String> getExchange(java.lang.String exchangeId)
                                                             throws RouterMonitorServiceErrorException
Get the exchange with the given exchange Id.

Parameters:
exchangeId -
Returns:
The exchange in a key/value form
Throws:
RouterMonitorServiceErrorException

getExchangeHistory

public java.util.Map<java.lang.String,java.lang.Long> getExchangeHistory(java.lang.String exchangeId)
                                                                  throws RouterMonitorServiceErrorException
Get the history of the given exchange.

Parameters:
exchangeId - the send/received history
Returns:
The history exchange in a key/value form
Throws:
RouterMonitorServiceErrorException

getExchangeIds

public java.util.List<java.lang.String> getExchangeIds(javax.xml.namespace.QName interfaceName,
                                                       javax.xml.namespace.QName serviceName,
                                                       java.lang.String endpointName,
                                                       javax.xml.namespace.QName operationName,
                                                       long startDate,
                                                       long endDate)
                                                throws RouterMonitorServiceErrorException
Get the list of exchange Ids that has been sent or received at least once, matching the given criteria and the exchange persistence duration

Parameters:
interfaceName - The interface name that exchange targets. Can be null
serviceName - The service name that exchange targets. Can be null
endpointName - The endpoint name that exchange targets. Can be null
operationName - The operation name that exchange targets. Can be null
startDate - The start date
endDate - The end date
Returns:
The list of the exchange Ids
Throws:
RouterMonitorServiceErrorException

getExchangeIds

public java.util.List<java.lang.String> getExchangeIds(java.lang.String propertyKey,
                                                       java.lang.String propertyValue)
                                                throws RouterMonitorServiceErrorException
Get the list of exchange Ids that has been sent or received at least once, matching the given criteria and the exchange persistence duration

Parameters:
propertyKey - The name of the property
propertyValue - The value of the property as a String
Returns:
The list of the exchange Ids
Throws:
RouterMonitorServiceErrorException

getExchanges

public int getExchanges(javax.xml.namespace.QName interfaceName,
                        javax.xml.namespace.QName serviceName,
                        java.lang.String endpointName,
                        javax.xml.namespace.QName operationName,
                        long startDate,
                        long endDate)
                 throws RouterMonitorServiceErrorException
Get the number of exchange that has been sent or received at least once and matching the duration

Parameters:
interfaceName - The interface name that exchange targets. Can be null
serviceName - The service name that exchange targets. Can be null
endpointName - The endpoint name that exchange targets. Can be null
operationName - The operation name that exchange targets. Can be null
startDate - The start date
endDate - The end date
Returns:
The list of the exchange Ids
Throws:
RouterMonitorServiceErrorException

getMonitoredExchange

public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getMonitoredExchange()
                                                                                      throws RouterMonitorServiceErrorException
Get the list of Router Monitor filter.

Returns:
the list of Router Monitor filter in key/values form.
Throws:
RouterMonitorServiceErrorException

getMonitorStorageDuration

public java.lang.Long getMonitorStorageDuration()
                                         throws RouterMonitorServiceErrorException
Get the duration of the monitoring storage. Once the duration is reached, the persisted data related to the monitored exchange are deleted.

Returns:
The duration in milliseconds
Throws:
RouterMonitorServiceErrorException

monitorExchanges

public void monitorExchanges(javax.xml.namespace.QName interfaceName,
                             javax.xml.namespace.QName serviceName,
                             java.lang.String endpointName,
                             javax.xml.namespace.QName operationName,
                             boolean storeExchanges)
                      throws RouterMonitorServiceErrorException
Activate the monitoring of the exchanges matching the given criteria.

Parameters:
interfaceName - The interface name that exchange targets. Can be null
serviceName - The service name that exchange targets. Can be null
endpointName - The endpoint name that exchange targets. Can be null
operationName - The operation name that exchange targets. Can be null
storeExchanges - if true, the exchanges are stored in the Persistence Service.
Throws:
RouterMonitorServiceErrorException

setMonitorStorageDuration

public void setMonitorStorageDuration(long duration)
                               throws RouterMonitorServiceErrorException
Set the duration of the monitoring storage. Once the duration is reached, the persisted data related to the monitored exchange are deleted.

Parameters:
duration - The duration in millisecond
Throws:
RouterMonitorServiceErrorException

unmonitorExchanges

public void unmonitorExchanges(javax.xml.namespace.QName interfaceName,
                               javax.xml.namespace.QName serviceName,
                               java.lang.String endpointName,
                               javax.xml.namespace.QName operationName)
                        throws RouterMonitorServiceErrorException
Deactivate the monitoring of the exchanges matching the given criteria.

Parameters:
interfaceName - The interface name that exchange targets. Can be null
ServiceName - The service name that exchange targets. Can be null
endpointName - The endpoint name that exchange targets. Can be null
operationName - The operation name that exchange targets. Can be null
Throws:
RouterMonitorServiceErrorException


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