public class SonicMQRequester extends java.lang.Object implements Requester, java.util.Comparator<com.sonicsw.mf.common.metrics.IMetric>
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
uri |
| Constructor and Description |
|---|
SonicMQRequester(java.util.Map props)
Creates new SonicMQRequester
|
| Modifier and Type | Method and Description |
|---|---|
javax.management.NotificationListener |
addListener(java.lang.String target) |
javax.management.NotificationListener |
addListener(java.lang.String target,
java.lang.String className,
java.lang.String methodName,
java.lang.Object obj)
adds a listener with a filter for notifications to the target and
waits for interruptions while listening on the filtered notifications
|
java.util.List<javax.jms.Message> |
browse(java.lang.String target,
int limit,
boolean isLocal)
returns a list of messages for a durable subscription or null
|
void |
close() |
int |
compare(com.sonicsw.mf.common.metrics.IMetric a,
com.sonicsw.mf.common.metrics.IMetric b) |
static void |
displayNotification(javax.management.Notification notification)
displays the notification in details
|
static java.util.Map |
getAttributes(javax.management.Notification notification) |
java.util.Map<java.lang.String,java.util.List> |
getInfo(java.lang.String target)
returns an Map with MBeanInfo for the target
|
int |
getResponse(java.lang.String jmxCmd,
java.lang.StringBuffer strBuf,
boolean autoDisconn)
This takes a JMX query command and converts it into a JMX request.
|
java.lang.String |
getURI() |
java.lang.Object |
getValue(javax.management.ObjectName objName,
java.lang.String attr)
returns the value of the attribute from the objName
|
java.lang.Object |
getValue(java.lang.String target,
java.lang.String attr)
returns the value of the attribute from the target
|
java.util.Map<java.lang.String,java.lang.Object> |
getValues(javax.management.ObjectName objName,
java.lang.String[] attrs)
returns the key-value map for the attributes from the objName
|
java.util.Map<java.lang.String,java.lang.Object> |
getValues(java.lang.String target,
java.lang.String[] attrs)
returns the key-value map for the attributes from the target
|
boolean |
isConnected() |
java.lang.String[] |
list(java.lang.String target,
java.lang.String regex)
returns names of the all MBeans for the given pattern on the server
|
static void |
main(java.lang.String[] args) |
java.util.List<java.util.Map> |
query(java.lang.String target,
java.lang.String regex) |
java.lang.String |
reconnect()
returns null if reconnected or error msg otherwise
|
void |
removeListener(javax.management.NotificationListener listener)
removes the listener
|
public SonicMQRequester(java.util.Map props)
public java.lang.String[] list(java.lang.String target,
java.lang.String regex)
throws javax.management.JMException
javax.management.JMExceptionpublic java.util.List<java.util.Map> query(java.lang.String target,
java.lang.String regex)
throws javax.management.JMException
javax.management.JMExceptionpublic java.util.List<javax.jms.Message> browse(java.lang.String target,
int limit,
boolean isLocal)
throws javax.management.JMException
javax.management.JMExceptionpublic javax.management.NotificationListener addListener(java.lang.String target)
throws javax.management.JMException
javax.management.JMExceptionpublic javax.management.NotificationListener addListener(java.lang.String target,
java.lang.String className,
java.lang.String methodName,
java.lang.Object obj)
throws javax.management.JMException
javax.management.JMExceptionpublic void removeListener(javax.management.NotificationListener listener)
public java.util.Map<java.lang.String,java.util.List> getInfo(java.lang.String target)
throws javax.management.JMException
javax.management.JMExceptionpublic java.lang.Object getValue(java.lang.String target,
java.lang.String attr)
throws javax.management.JMException
javax.management.JMExceptionpublic java.lang.Object getValue(javax.management.ObjectName objName,
java.lang.String attr)
throws javax.management.JMException
javax.management.JMExceptionpublic java.util.Map<java.lang.String,java.lang.Object> getValues(java.lang.String target,
java.lang.String[] attrs)
throws javax.management.JMException
javax.management.JMExceptionpublic java.util.Map<java.lang.String,java.lang.Object> getValues(javax.management.ObjectName objName,
java.lang.String[] attrs)
throws javax.management.JMException
javax.management.JMExceptionpublic int getResponse(java.lang.String jmxCmd,
java.lang.StringBuffer strBuf,
boolean autoDisconn)
throws WrapperException
getResponse in interface RequesterWrapperExceptionpublic boolean isConnected()
isConnected in interface Connectorpublic java.lang.String reconnect()
public int compare(com.sonicsw.mf.common.metrics.IMetric a,
com.sonicsw.mf.common.metrics.IMetric b)
compare in interface java.util.Comparator<com.sonicsw.mf.common.metrics.IMetric>public static void displayNotification(javax.management.Notification notification)
public static java.util.Map getAttributes(javax.management.Notification notification)
public static void main(java.lang.String[] args)