Package org.cipango.console.printer.generic

Examples of org.cipango.console.printer.generic.MultiplePrinter


      }
      else if (command.equals(MenuPrinter.DIAMETER_LOGS.getName()))
        request.setAttribute(Attributes.CONTENT, new DiameterLogPrinter(_mbsc, request, Output.HTML));
      else if (command.equals(MenuPrinter.CONFIG_SNMP.getName()))
      {
        MultiplePrinter printer = new MultiplePrinter();
        ObjectName[] connectors = (ObjectName[]) _mbsc.getAttribute(SNMP_AGENT, "connectors");
        printer.add(new SetPrinter(connectors, "snmp.connectors", _mbsc));
       
        ObjectName[] traps = (ObjectName[]) _mbsc.getAttribute(SNMP_AGENT, "trapReceivers");
        printer.add(new SetPrinter(traps, "snmp.trap", _mbsc));
        request.setAttribute(Attributes.CONTENT, printer);
      }
      else if (command.equals(MenuPrinter.CALLS.getName()))
        request.setAttribute(Attributes.CONTENT, new CallsPrinter(_mbsc, request.getParameter("callID")));
      else if (command.equals("message.log"))
View Full Code Here


    }
  }
 
  private void doAbout(HttpServletRequest request) throws Exception
  {
    MultiplePrinter printer = new MultiplePrinter();
    printer.add(new PropertiesPrinter(getVersion()));
    printer.add(new PropertiesPrinter(getEnvironment()));
    request.setAttribute(Attributes.CONTENT, printer);
  }
View Full Code Here

   
//  ---------------------------  SIP -------------------------------------

  private void doSipConfig(HttpServletRequest request) throws Exception
  {
    MultiplePrinter printer = new MultiplePrinter();
    ObjectName[] connectors = (ObjectName[]) _mbsc.getAttribute(ConsoleFilter.CONNECTOR_MANAGER, "connectors");

    printer.add(new SetPrinter(connectors, "sip.connectors", _mbsc));
    ObjectName threadPool = (ObjectName) _mbsc.getAttribute(
        ConsoleFilter.SERVER, "sipThreadPool");
   
    PropertyList properties = new PropertyList(_mbsc, threadPool, "sip.threadPool");
    for (Property property : properties)
    {
      String name = property.getName();
      int index = Math.max(name.indexOf("in pool"), name.indexOf("in the pool"));
      if (index != -1)
        property.setName(name.substring(0, index));
    }
    printer.add(new PropertiesPrinter(properties));
   
    printer.add(new PropertiesPrinter(ConsoleFilter.TRANSACTION_MANAGER, "sip.timers", _mbsc)
    {
      @Override
      protected void printHeaders(Writer out, boolean hasNotes) throws Exception
      {
        out.write("<div class=\"data\">\n<table>\n"
View Full Code Here

//  ---------------------------  Diameter -------------------------------------
 
  private void doDiameterConfig(HttpServletRequest request)
  throws Exception
  {   
    MultiplePrinter printer = new MultiplePrinter();
    printer.add(new PropertiesPrinter(DIAMETER_NODE, "diameter.node",  _mbsc));
   
    ObjectName[] transports = (ObjectName[]) _mbsc.getAttribute(
        ConsoleFilter.DIAMETER_NODE, "connectors");
    printer.add(new SetPrinter(transports, "diameter.transport", _mbsc));
   
    printer.add(new PropertiesPrinter(DIAMETER_NODE, "diameter.timers",  _mbsc));

    @SuppressWarnings("unchecked")
    Set<ObjectName> peers = _mbsc.queryNames(ConsoleFilter.DIAMETER_PEERS, null);
    printer.add(new SetPrinter(peers, "diameter.peers", _mbsc))
         
    request.setAttribute(Attributes.CONTENT, printer);
  }
View Full Code Here

  //  ---------------------------  HTTP -------------------------------------
 
  private void doHttpConfig(HttpServletRequest request)
  throws Exception
  {   
    MultiplePrinter printer = new MultiplePrinter();
    ObjectName[] connectors = (ObjectName[]) _mbsc.getAttribute(SERVER, "connectors");
 
    printer.add(new SetPrinter(connectors, "http.connectors", _mbsc));
   
    ObjectName threadPool = (ObjectName) _mbsc.getAttribute(
        ConsoleFilter.SERVER, "threadPool");
    PropertyList properties = new PropertyList(_mbsc, threadPool, "http.threadPool");
    for (Property property : properties)
    {
      String name = property.getName();
      int index = Math.max(name.indexOf("in pool"), name.indexOf("in the pool"));
      if (index != -1)
        property.setName(name.substring(0, index));
    }
    printer.add(new PropertiesPrinter(properties));
             
    request.setAttribute(Attributes.CONTENT, printer);
  }
View Full Code Here

TOP

Related Classes of org.cipango.console.printer.generic.MultiplePrinter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.