code: @Override
      public void removeAllResourses() throws Exception {
          synchronized (this) {
              if (!this.started) {
                  throw new Exception(String.format("Management=%s not started", this.name));
              }
  
              if (this.associations.size() == 0 && this.servers.size() == 0)
                  // no resources allocated - nothing to do
                  return;
  
              if (logger.isInfoEnabled()) {
                  logger.info(String.format("Removing allocated resources: Servers=%d, Associations=%d", this.servers.size(),
                          this.associations.size()));
              }
  
              // Remove all associations
              ArrayList<String> lst = new ArrayList<String>();
              for (FastMap.Entry<String, Association> n = this.associations.head(), end = this.associations.tail(); (n = n
                      .getNext()) != end;) {
                  lst.add(n.getKey());
              }
              for (String n : lst) {
                  this.stopAssociation(n);
                  this.removeAssociation(n);
              }
  
              // Remove all servers
              lst.clear();
              for (FastList.Node<Server> n = this.servers.head(), end = this.servers.tail(); (n = n.getNext()) != end;) {
                  lst.add(n.getValue().getName());
              }
              for (String n : lst) {
                  this.stopServer(n);
                  this.removeServer(n);
              }
  
              // We store the cleared state
              this.store();
  
              for (ManagementEventListener lstr : managementEventListeners) {
                  try {
                      lstr.onRemoveAllResources();
                  } catch (Throwable ee) {
                      logger.error("Exception while invoking onRemoveAllResources", ee);
                  }
              }
          }
  
      }
docs: /*
  (non-Javadoc)
  
  @see org.mobicents.protocols.api.Management#removeAllResourses()