01: /*
02: * To change this template, choose Tools | Templates
03: * and open the template in the editor.
04: */
05:
06: package org.netbeans.modules.sun.manager.jbi.management;
07:
08: import com.sun.esb.management.api.performance.PerformanceMeasurementService;
09: import com.sun.esb.management.api.runtime.RuntimeManagementService;
10: import com.sun.esb.management.client.ManagementClient;
11: import com.sun.esb.management.common.ManagementRemoteException;
12: import org.netbeans.modules.sun.manager.jbi.management.wrapper.api.PerformanceMeasurementServiceWrapper;
13: import org.netbeans.modules.sun.manager.jbi.management.wrapper.api.RuntimeManagementServiceWrapper;
14: import org.netbeans.modules.sun.manager.jbi.management.wrapper.api.impl.PerformanceMeasurementServiceWrapperImpl;
15: import org.netbeans.modules.sun.manager.jbi.management.wrapper.api.impl.RuntimeManagementServiceWrapperImpl;
16:
17: /**
18: *
19: * @author jqian
20: */
21: public class ServiceFactory {
22:
23: public static RuntimeManagementServiceWrapper getRuntimeManagementServiceWrapper(
24: ManagementClient mgmtClient)
25: throws ManagementRemoteException {
26: RuntimeManagementService service = mgmtClient
27: .getRuntimeManagementService();
28: return new RuntimeManagementServiceWrapperImpl(service);
29: }
30:
31: public static PerformanceMeasurementServiceWrapper gePerformanceMeasurementServiceWrapper(
32: ManagementClient mgmtClient)
33: throws ManagementRemoteException {
34: PerformanceMeasurementService service = mgmtClient
35: .getPerformanceMeasurementService();
36: return new PerformanceMeasurementServiceWrapperImpl(service);
37: }
38: }
|