Skip to content
Snippets Groups Projects
Commit 2ec530ca authored by Locatelli's avatar Locatelli
Browse files

Review of remaining estimated time display: Use un-closable SPY strategy

parent a281dc86
Branches
No related tags found
No related merge requests found
4.1.10 --/--/----
-----
4.1.9 3/11/2022
-----
* Review of remaining estimated time display: Use un-closable SPY strategy
4.1.8 28/10/2022
-----
* Cameo API 2.1.0
......
......@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fr.ill.ics</groupId>
<artifactId>nomadcommandsystem</artifactId>
<version>4.1.9-SNAPSHOT</version>
<version>4.1.10-SNAPSHOT</version>
<name>NomadCommandSystem</name>
<description>Java bridge for the communication with the Nomad server</description>
<scm>
......
......@@ -28,7 +28,6 @@ import fr.ill.ics.bridge.events.ServerResetCommandEvent;
import fr.ill.ics.bridge.listeners.ServerCommandBoxDeletedListener;
import fr.ill.ics.bridge.listeners.ServerCommandStateChangeListener;
import fr.ill.ics.bridge.listeners.ServerCommandZoneErrorListener;
import fr.ill.ics.bridge.listeners.ServerCommandZoneEstimatedTime;
import fr.ill.ics.bridge.listeners.ServerCommandZoneSyncListener;
import fr.ill.ics.bridge.listeners.ServerProgressChangeListener;
import fr.ill.ics.bridge.listeners.ServerResetCommandListener;
......@@ -57,7 +56,6 @@ public class CommandZoneWrapper implements ICommandZoneEventListener, ICommandZo
private ServerCommandZoneErrorListener commandZoneErrorListener;
private ServerCommandZoneSyncListener commandZoneSyncListener;
private ServerCommandBoxDeletedListener commandBoxDeletedListener;
private ServerCommandZoneEstimatedTime commandZoneEstimatedTime;
public CommandZoneWrapper(String serverId) {
this.serverId = serverId;
......@@ -110,10 +108,6 @@ public class CommandZoneWrapper implements ICommandZoneEventListener, ICommandZo
this.commandBoxDeletedListener = listener;
}
public void addServerCommandZoneEstimatedTimeListener(ServerCommandZoneEstimatedTime listener) {
this.commandZoneEstimatedTime = listener;
}
public void removeServerProgressChangeListener(ServerProgressChangeListener listener) {
this.commandProgressListener = null;
CommandZoneEventClient.getInstance().removeCommandZoneListener(this);
......@@ -140,10 +134,6 @@ public class CommandZoneWrapper implements ICommandZoneEventListener, ICommandZo
this.commandBoxDeletedListener = null;
}
public void removeaddServerCommandZoneEstimatedTimeListener(ServerCommandZoneEstimatedTime listener) {
this.commandZoneEstimatedTime = null;
}
public void commandZoneStarted() {
if (commandStateListener != null) {
ServerCommandStateChangeEvent event = new ServerCommandStateChangeEvent(null, null);
......@@ -187,12 +177,6 @@ public class CommandZoneWrapper implements ICommandZoneEventListener, ICommandZo
}*/
}
public void estimatedTimeChanged(double value) {
if (commandZoneEstimatedTime != null) {
commandZoneEstimatedTime.estimatedTimeChanged(value);
}
}
public void errorOccurred(String message) {
commandZoneErrorListener.errorOccurred(message);
}
......
......@@ -31,6 +31,5 @@ public interface ICommandZoneEventListener {
int getCommandZoneID();
void onReset();
void onCommandBoxesDeleted(List<Integer> commandBoxIds);
void estimatedTimeChanged(double value);
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.bridge.listeners;
public interface ServerCommandZoneEstimatedTime {
void estimatedTimeChanged(double remainingtime);
}
\ No newline at end of file
......@@ -383,20 +383,6 @@ public class CommandZoneEventClient {
}
}
private void notifyNewEstimatedTime(NewEstimatedTimeEvent event) {
synchronized (commandZoneListeners) {
if (commandZoneListeners.containsKey(event.getCommandZoneId())) {
HashSet<ICommandZoneEventListener> listeners = commandZoneListeners.get(event.getCommandZoneId());
Iterator<ICommandZoneEventListener> it = listeners.iterator();
while (it.hasNext()) {
it.next().estimatedTimeChanged(event.getValue());
}
}
}
}
public void readAndDispatch() {
// copy pending property changes to unblock any server calls
......@@ -445,10 +431,6 @@ public class CommandZoneEventClient {
} else if (event instanceof CommandBoxesDeletedEvent) {
notifyCommandBoxesDeleted((CommandBoxesDeletedEvent)event);
} else if (event instanceof NewEstimatedTimeEvent) {
notifyNewEstimatedTime((NewEstimatedTimeEvent)event);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment