@Override public boolean isStarted() { return this.wrappedAssociation.isStarted(); }
protected void unsetAssociation() throws Exception { if (this.association != null) { if (this.association.isStarted()) { throw new Exception(String.format("Association=%s is still started. Stop first", this.association.getName())); } this.association.setAssociationListener(null); this.association = null; } }
protected void unsetAssociation() throws Exception { if (this.association != null) { if (this.association.isStarted()) { throw new Exception(String.format("Association=%s is still started. Stop first", this.association.getName())); } this.association.setAssociationListener(null); this.association = null; } }
public void startAssociation(String assocName) throws Exception { if (!this.started) { throw new Exception(String.format("Management=%s not started", this.name)); } if (assocName == null) { throw new Exception("Association name cannot be null"); } Association associationTemp = this.associations.get(assocName); if (associationTemp == null) { throw new Exception(String.format("No Association found for name=%s", assocName)); } if (associationTemp.isStarted()) { throw new Exception(String.format("Association=%s is already started", assocName)); } ((AssociationImpl) associationTemp).start(); this.store(); }
@Override public void startAssociation(String assocName) throws Exception { if (!this.started) { throw new Exception(String.format("Management=%s not started", this.name)); } if (assocName == null) { throw new Exception("Association name cannot be null"); } Association associationTemp = this.associations.get(assocName); if (associationTemp == null) { throw new Exception(String.format("No Association found for name=%s", assocName)); } if (associationTemp.isStarted()) { throw new Exception(String.format("Association=%s is already started", assocName)); } ((NettyAssociationImpl) associationTemp).start(); this.store(); }
@Override public void onAssociationDown(Association asso) { if (asso.isStarted()) { AlarmMessage alm = this.generateAssociationAlarm(asso, false, false, "onAssociationDown"); this.alc.onAlarm(alm); } }
@Override public void onAssociationUp(Association ass) { if (ass.isStarted()) { AlarmMessage alm = this.generateAssociationAlarm(ass, true, false, "onAssociationUp"); this.alc.onAlarm(alm); } }
sb.append(M3UAOAMMessages.NEW_LINE); sb.append("ASSOCIATION ").append(asso.getIpChannelType().getType()).append(" name=").append(asso.getName()) .append(" started=").append(asso.isStarted()).append(" peerIp=").append(asso.getPeerAddress()) .append(" peerPort=").append(asso.getPeerPort()); if (asso.getAssociationType() == AssociationType.CLIENT) {
sb.append(M3UAOAMMessages.NEW_LINE); sb.append("ASSOCIATION ").append(asso.getIpChannelType().getType()).append(" name=").append(asso.getName()) .append(" started=").append(asso.isStarted()).append(" peerIp=").append(asso.getPeerAddress()) .append(" peerPort=").append(asso.getPeerPort()); if (asso.getAssociationType() == AssociationType.CLIENT) {
@Override public void onCongLevelChanged(Association association, int oldCongLevel, int newCongLevel) { if (association.isStarted()) { if (oldCongLevel > 0) { AlarmMessage alm = this.generateCongestionAlarm(association, oldCongLevel, true, false, "onCongLevelChanged"); this.alc.onAlarm(alm); } if (newCongLevel > 0) { AlarmMessage alm = this.generateCongestionAlarm(association, newCongLevel, false, false, "onCongLevelChanged"); this.alc.onAlarm(alm); } } }
protected void stop() throws Exception { FastList<String> tempAssociations = associations; for (FastList.Node<String> n = tempAssociations.head(), end = tempAssociations.tail(); (n = n.getNext()) != end;) { String assocName = n.getValue(); Association associationTemp = this.management.getAssociation(assocName); if (associationTemp.isStarted()) { throw new Exception(String.format("Stop all the associations first. Association=%s is still started", associationTemp.getName())); } } synchronized (this.anonymAssociations) { // stopping all anonymous associations for (Association ass : this.anonymAssociations) { ass.stopAnonymousAssociation(); } this.anonymAssociations.clear(); } this.started = false; if (logger.isInfoEnabled()) { logger.info(String.format("Stoped Server=%s", this.name)); } // Stop underlying channel and wait till its done if (this.getIpChannel() != null) { try { this.getIpChannel().close().sync(); } catch (Exception e) { logger.warn(String.format("Error while stopping the Server=%s", this.name), e); } } }
protected void stop() throws Exception { FastList<String> tempAssociations = associations; for (FastList.Node<String> n = tempAssociations.head(), end = tempAssociations.tail(); (n = n.getNext()) != end;) { String assocName = n.getValue(); Association associationTemp = this.management.getAssociation(assocName); if (associationTemp.isStarted()) { throw new Exception(String.format("Stop all the associations first. Association=%s is still started", associationTemp.getName())); } } synchronized (this.anonymAssociations) { // stopping all anonymous associations for (Association ass : this.anonymAssociations) { ass.stopAnonymousAssociation(); } this.anonymAssociations.clear(); } if (this.getIpChannel() != null) { try { this.getIpChannel().close(); } catch (Exception e) { logger.warn(String.format("Error while stopping the Server=%s", this.name), e); } } this.started = false; if (logger.isInfoEnabled()) { logger.info(String.format("Stoped Server=%s", this.name)); } }
serverAssociation.getPeerPort() }); logger.debug("Server Association Status: Started[{}] Connected[{}] Up[{}] ", new Object[]{serverAssociation.isStarted(), serverAssociation.isConnected(), serverAssociation.isUp()}); logger.trace("Server Association [{}]", serverAssociation);
if (association.isStarted()) { throw new Exception(String.format("Association name=%s is started. Stop before removing", assocName));
if (association.isStarted()) { throw new Exception(String.format("Association name=%s is started. Stop before removing", assocName));
for (FastMap.Entry<String, Association> n = associationsTemp.head(), end = associationsTemp.tail(); (n = n.getNext()) != end;) { Association associationTemp = n.getValue(); if (associationTemp.isStarted()) { ((AssociationImpl) associationTemp).stop();
if (association.isStarted()) { throw new Exception(String.format(M3UAOAMMessages.ASSOCIATION_IS_STARTED, associationName));
for (FastMap.Entry<String, Association> n = associationsTemp.head(), end = associationsTemp.tail(); (n = n.getNext()) != end;) { Association associationTemp = n.getValue(); if (associationTemp.isStarted()) { ((NettyAssociationImpl) associationTemp).stop();
if (association.isStarted()) { throw new Exception(String.format(M3UAOAMMessages.ASSOCIATION_IS_STARTED, associationName));
@Override public CurrentAlarmList getCurrentAlarmList() { CurrentAlarmListImpl al = new CurrentAlarmListImpl(); if (wrappedSctpManagement.isStarted()) { Map<String, Association> lstAss = wrappedSctpManagement.getAssociations(); for (Association ass : lstAss.values()) { if (ass.isStarted()) { if (!ass.isConnected()) { AlarmMessage alm = this.generateAssociationAlarm(ass, false, true, ""); this.alc.prepareAlarm(alm); al.addAlarm(alm); } int congLevel = ass.getCongestionLevel(); if (congLevel > 0) { AlarmMessage alm = this.generateCongestionAlarm(ass, congLevel, false, true, ""); this.alc.prepareAlarm(alm); al.addAlarm(alm); } } } } return al; }