@Override public String getName() { return this.wrappedServer.getName(); }
private void removeServerFromManagement(Server srv) { synchronized (this) { Server srvBeanX = null; for (Server srvBean : lstServers) { if (srvBean.getName().equals(srv.getName())) { srvBeanX = srvBean; break; } } lstServers.remove(srvBeanX); this.ss7Management.unregisterMBean(Ss7Layer.SCTP, SctpManagementType.SERVER, srv.getName()); } }
public void startNewRemoteConnection(Server server, Association association, String peerAddress, int peerPort) { logger.debug("Initializing new Remote Connection '{}' -> '{}' ---> '{}:{}'", new Object[]{this.origAddress, this.destAddress, peerAddress, peerPort}); remoteClientAssociationName = peerAddress + ":" + peerPort; serverName = server.getName();
public void stopServer(String serverName) throws Exception { if (!this.started) { throw new Exception(String.format("Management=%s not started", this.name)); } if (serverName == null) { throw new Exception("Server name cannot be null"); } FastList<Server> tempServers = servers; for (FastList.Node<Server> n = tempServers.head(), end = tempServers.tail(); (n = n.getNext()) != end;) { Server serverTemp = n.getValue(); if (serverName.equals(serverTemp.getName())) { ((ServerImpl) serverTemp).stop(); this.store(); return; } } throw new Exception(String.format("No Server found with name=%s", serverName)); }
private void addServerToManagement(Server srv) { synchronized (this) { SctpServerJmx srvBean = new SctpServerJmx(this, srv); this.ss7Management.registerMBean(Ss7Layer.SCTP, SctpManagementType.SERVER, srv.getName(), srvBean); lstServers.add(srvBean); } }
@Override public void stopServer(String serverName) throws Exception { if (!this.started) { throw new Exception(String.format("Management=%s not started", this.name)); } if (serverName == null) { throw new Exception("Server name cannot be null"); } FastList<Server> tempServers = servers; for (FastList.Node<Server> n = tempServers.head(), end = tempServers.tail(); (n = n.getNext()) != end;) { Server serverTemp = n.getValue(); if (serverName.equals(serverTemp.getName())) { ((NettyServerImpl) serverTemp).stop(); this.store(); return; } } throw new Exception(String.format("No Server found with name=%s", serverName)); }
public void startServer(String serverName) throws Exception { if (!this.started) { throw new Exception(String.format("Management=%s not started", this.name)); } if (name == null) { throw new Exception("Server name cannot be null"); } FastList<Server> tempServers = servers; for (FastList.Node<Server> n = tempServers.head(), end = tempServers.tail(); (n = n.getNext()) != end;) { Server serverTemp = n.getValue(); if (serverName.equals(serverTemp.getName())) { if (serverTemp.isStarted()) { throw new Exception(String.format("Server=%s is already started", serverName)); } ((ServerImpl) serverTemp).start(); this.store(); return; } } throw new Exception(String.format("No Server foubd with name=%s", serverName)); }
@Override public void startServer(String serverName) throws Exception { if (!this.started) { throw new Exception(String.format("Management=%s not started", this.name)); } if (name == null) { throw new Exception("Server name cannot be null"); } FastList<Server> tempServers = servers; for (FastList.Node<Server> n = tempServers.head(), end = tempServers.tail(); (n = n.getNext()) != end;) { Server serverTemp = n.getValue(); if (serverName.equals(serverTemp.getName())) { if (serverTemp.isStarted()) { throw new Exception(String.format("Server=%s is already started", serverName)); } ((NettyServerImpl) serverTemp).start(); this.store(); return; } } throw new Exception(String.format("No Server foubd with name=%s", serverName)); }
for (Server server : servers) { sb.append(M3UAOAMMessages.NEW_LINE); sb.append("SERVER ").append(server.getIpChannelType().getType()).append(" name=").append(server.getName()) .append(" started=").append(server.isStarted()).append(" hostIp=").append(server.getHostAddress()) .append(" hostPort=").append(server.getHostport());
for (Server server : servers) { sb.append(M3UAOAMMessages.NEW_LINE); sb.append("SERVER ").append(server.getIpChannelType().getType()).append(" name=").append(server.getName()) .append(" started=").append(server.isStarted()).append(" hostIp=").append(server.getHostAddress()) .append(" hostPort=").append(server.getHostport());
for (FastList.Node<Server> n = this.servers.head(), end = this.servers.tail(); (n = n.getNext()) != end;) { Server serverTemp = n.getValue(); if (serverName.equals(serverTemp.getName())) { throw new Exception(String.format("Server name=%s already exist", serverName)); throw new Exception(String.format("Server name=%s is already bound to %s:%d", serverTemp.getName(), serverTemp.getHostAddress(), serverTemp.getHostport()));
for (FastList.Node<Server> n = this.servers.head(), end = this.servers.tail(); (n = n.getNext()) != end;) { Server serverTemp = n.getValue(); if (serverName.equals(serverTemp.getName())) { throw new Exception(String.format("Server name=%s already exist", serverName)); throw new Exception(String.format("Server name=%s is already bound to %s:%d", serverTemp.getName(), serverTemp.getHostAddress(), serverTemp.getHostport()));
if (s.getName().equals(serverName)) { server = s; break;
if (serverTemp.getName().equals(serverName)) { server = serverTemp;
for (FastList.Node<Server> n = this.servers.head(), end = this.servers.tail(); (n = n.getNext()) != end;) { Server serverTemp = n.getValue(); if (serverTemp.getName().equals(association.getServerName())) { FastList<String> newAssociations2 = new FastList<String>(); newAssociations2.addAll(((ServerImpl) serverTemp).associations);
for (FastList.Node<Server> n = this.servers.head(), end = this.servers.tail(); (n = n.getNext()) != end;) { Server serverTemp = n.getValue(); if (serverTemp.getName().equals(association.getServerName())) { FastList<String> newAssociations2 = new FastList<String>(); newAssociations2.addAll(((NettyServerImpl) serverTemp).associations);
lst.add(n.getValue().getName());
lst.add(n.getValue().getName());
((NettyServerImpl) serverTemp).stop(); } catch (Exception e) { logger.error(String.format("Exception while stopping the Server=%s", serverTemp.getName()), e);
((ServerImpl) serverTemp).start(); } catch (Exception e) { logger.error(String.format("Error while initiating Server=%s", serverTemp.getName()), e);