private void notifyCommand(final String message, final String cmd) throws Exception { if (TangoConnectionFactory.isMockMode()) { // We also send this back to the workbench. final MBeanServerConnection client = getRemoteClient(); client.invoke( RemoteWorkbenchAgent.REMOTE_WORKBENCH, "notifyMockCommand", new Object[] {getName(), message, cmd}, new String[] {String.class.getName(), String.class.getName(), String.class.getName()}); // We also set this in this VM if (System.getProperty("eclipse.debug.session") == null) TangoConnectionFactory.notifyMockCommand(getName(), message, cmd); } else { throw new Exception("Cannot set Mock Values when not in mock mode!"); } }
private void setValue(String name, Object value) throws Exception { if (TangoConnectionFactory.isMockMode()) { // We also send this back to the workbench. final MBeanServerConnection client = getRemoteClient(); client.invoke( RemoteWorkbenchAgent.REMOTE_WORKBENCH, "setMockMotorValue", new Object[] {name, value}, new String[] {String.class.getName(), Object.class.getName()}); // We also set this in this VM if (System.getProperty("eclipse.debug.session") == null) TangoConnectionFactory.setMockValue(name, value); } else { throw new Exception("Cannot set Mock Values when not in mock mode!"); } }
private Object getRemoteValue() throws Exception { if (TangoConnectionFactory.isMockMode()) { // We also send this back to the workbench. final MBeanServerConnection client = getRemoteClient(); return client.invoke( RemoteWorkbenchAgent.REMOTE_WORKBENCH, "getMockMotorValue", new Object[] {getName()}, new String[] {String.class.getName()}); } else { throw new Exception("Cannot set Mock Values when not in mock mode!"); } }