Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 4bf01e75 authored by Guillaume Thomazon's avatar Guillaume Thomazon
Browse files

Add stop all channels

git-svn-id: https://scm.gforge.inria.fr/authscm/ycadoret/svn/gazelle/Maven/gazelle-proxy/trunk@35077 356b4b1a-1d2b-0410-8bf1-ffa24008f01e
parent 602de106
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,7 @@ import java.util.List; ...@@ -22,6 +22,7 @@ import java.util.List;
import net.ihe.gazelle.proxy.netty.ChannelType; import net.ihe.gazelle.proxy.netty.ChannelType;
import net.ihe.gazelle.proxy.netty.ConnectionConfig; import net.ihe.gazelle.proxy.netty.ConnectionConfig;
import net.ihe.gazelle.proxy.netty.ConnectionConfigSimple; import net.ihe.gazelle.proxy.netty.ConnectionConfigSimple;
import net.ihe.gazelle.proxy.netty.Proxy;
import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.commons.lang.exception.ExceptionUtils;
import org.jboss.seam.ScopeType; import org.jboss.seam.ScopeType;
...@@ -139,4 +140,20 @@ public class ChannelManagerBean implements Serializable { ...@@ -139,4 +140,20 @@ public class ChannelManagerBean implements Serializable {
stopChannel(channelToStop); stopChannel(channelToStop);
} }
public void stopAllChannels() {
List<Proxy<?, ?>> lp = proxyBean.getListOfProxies();
int size = lp.size();
if (size > 0) {
for (int i = 0; i < size; i++) {
int port = lp.get(0).getProxyProviderPort();
stopChannel(port);
}
FacesMessages.instance().add(StatusMessage.Severity.INFO, "All channels are now closed !");
} else {
FacesMessages.instance().add(StatusMessage.Severity.ERROR,
"Failed to stop channel : none proxy channel open !");
}
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment