1 23 24 29 30 package com.sun.enterprise.admin.jmx.remote.comm; 31 32 import javax.management.remote.message.MBeanServerRequestMessage; 33 import javax.management.remote.message.MBeanServerResponseMessage; 34 import com.sun.enterprise.admin.jmx.remote.streams.StreamMBeanServerRequestMessage; 35 36 47 48 public class MBeanServerMessageConductor { 49 50 private final IConnection connection; 51 52 53 public MBeanServerMessageConductor(IConnection connection) { 54 this.connection = connection; 55 } 56 57 public MBeanServerResponseMessage invoke(int methodId, Object [] params) 58 throws Exception { 59 final StreamMBeanServerRequestMessage request = new StreamMBeanServerRequestMessage(methodId, params, null); connection.send(request); 61 return ((MBeanServerResponseMessage)connection.receive()); 63 } 64 } 65 | Popular Tags |