private MainDeployerMBean getMainDeployer() throws MBeanProxyCreationException { MBeanServer server = MBeanServerLocator.locateJBoss(); MainDeployerMBean mainDeployer = (MainDeployerMBean)MBeanProxy.get(MainDeployerMBean.class, MainDeployerMBean.OBJECT_NAME, server); return mainDeployer; } }
/** * Create an MBean proxy. * @param intf The interface which the proxy will implement. * @param name The name of the MBean to proxy invocations to. * @return A MBean proxy. */ public static Object create(final Class intf, final ObjectName name) { return create(intf, name, MBeanServerLocator.locateJBoss()); }
public static JBossASServerConfig locate() { if (instance == null) { instance = (JBossASServerConfig) MBeanProxyExt.create(JBossASServerConfig.class, ServerConfigImplMBean.OBJECT_NAME); } return instance; } }
/** * Consctructor. */ InvocationHandlerEJB21() { super(); this.server = MBeanServerLocator.locateJBoss(); }
/** * format with a date time */ public static String format(String format, long time) { TimeFormat f = new TimeFormat(time); return f.parse(format, f.getDays(), f.getHours(), f.getMinutes(), f.getSeconds(), f.getMilliseconds()); }
private Exception decode(Exception e) { Throwable t = JMXExceptionDecoder.decode(e); if(t instanceof Exception) return (Exception) t; throw (Error) t; }
/** * update * */ private void getTime() { getDays(this); getHours(this); getMinutes(this); getSeconds(this); }
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) { notifier.addNotificationListener(listener, filter, handback); }
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException { notifier.removeNotificationListener(listener, filter, handback); }
public void handleNotification(NotificationListener listener, Notification notification, Object handback) { notificationDelegate.handleNotification(listener, notification, handback); }
/** * print out the time format in a string representation */ public String toString() { return format(rounding); }
/** * update time * * * @param t */ public void getTime(TimeFormat t) { t.getTime(); }
/** * Send an attribute error notification. * * @param object the observedObject. * @param message the human readable message to send. */ void sendAttributeErrorNotification(ObservedObject object, String message) { if (object.notAlreadyNotified(ObservedObject.OBSERVED_ATTRIBUTE_ERROR_NOTIFIED)) sendNotification(object, MonitorNotification.OBSERVED_ATTRIBUTE_ERROR, 0, message, monitor.getObservedAttribute(), null, null); }
/** * Check whether the work got rescheduled */ private synchronized void endRun() { running = false; if (reschedule == true) timeout = scheduler.add(this); reschedule = false; }
/** * Returns the first available MBeanServer * * @return the first available MBeanServer */ public static MBeanServer locate() { return locate(null); }
private MainDeployerMBean getMainDeployer() throws MBeanProxyCreationException { MBeanServer server = MBeanServerLocator.locateJBoss(); MainDeployerMBean mainDeployer = (MainDeployerMBean)MBeanProxy.get(MainDeployerMBean.class, MainDeployerMBean.OBJECT_NAME, server); return mainDeployer; } }
protected EJBTimerService getEJBTimerService() { return (EJBTimerService) MBeanProxyExt.create(EJBTimerService.class, EJBTimerService.OBJECT_NAME, MBeanServerLocator.locateJBoss()); }
public JmxKernelAbstraction(MBeanServer server) { super(server); serviceController = (ServiceControllerMBean) MBeanProxyExt.create(ServiceControllerMBean.class, ServiceControllerMBean.OBJECT_NAME, server); }
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) { notificationDelegate .addNotificationListener(listener, filter, handback); }
private MainDeployerMBean getMainDeployer() throws MBeanProxyCreationException { MBeanServer server = MBeanServerLocator.locateJBoss(); MainDeployerMBean mainDeployer = (MainDeployerMBean)MBeanProxy.get(MainDeployerMBean.class, MainDeployerMBean.OBJECT_NAME, server); return mainDeployer; } }