1 23 24 29 30 31 package com.sun.enterprise.admin.jmx.remote.server.callers; 32 33 import javax.management.MBeanServerConnection ; 34 import javax.management.ObjectName ; 35 import javax.management.QueryExp ; 36 import javax.management.remote.message.MBeanServerRequestMessage; 37 import javax.management.remote.message.MBeanServerResponseMessage; 38 39 45 46 public class QueryNamesCaller extends AbstractMethodCaller { 47 48 49 public QueryNamesCaller(MBeanServerConnection mbsc) { 50 super(mbsc); 51 METHOD_ID = MBeanServerRequestMessage.QUERY_NAMES; 52 } 53 54 public MBeanServerResponseMessage call(MBeanServerRequestMessage request) { 55 Object result = null; 56 boolean isException = false; 57 try { 58 result = mbsc.queryNames( 59 (ObjectName )request.getParams()[0], 60 (QueryExp )request.getParams()[1]); 61 } 62 catch(Throwable e) { 63 result = e; 64 isException = true; 65 } 66 return ( new MBeanServerResponseMessage(METHOD_ID, result, isException) ); 67 } 68 } | Popular Tags |