Package org.nasutekds.server.api

Examples of org.nasutekds.server.api.DebugLogPublisher


    {
      config.addDebugChangeListener(this);

      if(config.isEnabled())
      {
        DebugLogPublisher debugLogPublisher = getDebugPublisher(config);

        addDebugLogPublisher(debugLogPublisher);
      }
    }
  }
View Full Code Here


    if(config.isEnabled())
    {
      try
      {
        DebugLogPublisher debugLogPublisher =
            getDebugPublisher(config);

        addDebugLogPublisher(debugLogPublisher);
      }
      catch(ConfigException e)
View Full Code Here

    boolean adminActionRequired = false;
    ArrayList<Message> messages = new ArrayList<Message>();

    DN dn = config.dn();

    DebugLogPublisher debugLogPublisher = null;
    for(DebugLogPublisher publisher : debugPublishers)
    {
      if(publisher.getDN().equals(dn))
      {
        debugLogPublisher = publisher;
      }
    }

    if(debugLogPublisher == null)
    {
      if(config.isEnabled())
      {
        // Needs to be added and enabled.
        return applyConfigurationAdd(config);
      }
    }
    else
    {
      if(config.isEnabled())
      {
        // The publisher is currently active, so we don't need to do anything.
        // Changes to the class name cannot be
        // applied dynamically, so if the class name did change then
        // indicate that administrative action is required for that
        // change to take effect.
        String className = config.getJavaClass();
        if(!className.equals(debugLogPublisher.getClass().getName()))
        {
          adminActionRequired = true;
        }
      }
      else
View Full Code Here

  public boolean isConfigurationDeleteAcceptable(DebugLogPublisherCfg config,
                                             List<Message> unacceptableReasons)
  {
    DN dn = config.dn();

    DebugLogPublisher debugLogPublisher = null;
    for(DebugLogPublisher publisher : debugPublishers)
    {
      if(publisher.getDN().equals(dn))
      {
        debugLogPublisher = publisher;
View Full Code Here

  {
    // Default result code.
    ResultCode resultCode = ResultCode.SUCCESS;
    boolean adminActionRequired = false;

    DebugLogPublisher debugLogPublisher = null;
    for(DebugLogPublisher publisher : debugPublishers)
    {
      if(publisher.getDN().equals(config.dn()))
      {
        debugLogPublisher = publisher;
View Full Code Here

    String className = config.getJavaClass();
    DebugLogPublisherCfgDefn d = DebugLogPublisherCfgDefn.getInstance();
    ClassPropertyDefinition pd =
        d.getJavaClassPropertyDefinition();
    // Load the class and cast it to a DebugLogPublisher.
    DebugLogPublisher publisher = null;
    Class<? extends DebugLogPublisher> theClass;
    try {
      theClass = pd.loadClass(className, DebugLogPublisher.class);
      publisher = theClass.newInstance();
    } catch (Exception e) {
View Full Code Here

    DebugLogPublisherCfgDefn d = DebugLogPublisherCfgDefn.getInstance();
    ClassPropertyDefinition pd =
        d.getJavaClassPropertyDefinition();
    // Load the class and cast it to a DebugLogPublisher.
    Class<? extends DebugLogPublisher> theClass;
    DebugLogPublisher debugLogPublisher;
    try {
      theClass = pd.loadClass(className, DebugLogPublisher.class);
      debugLogPublisher = theClass.newInstance();

      // Determine the initialization method to use: it must take a
View Full Code Here

    publisherSettings = new PublisherSettings[publishers.length];

    // Get the settings from all publishers.
    for(int i = 0; i < publishers.length; i++)
    {
      DebugLogPublisher publisher = publishers[i];
      PublisherSettings settings = new PublisherSettings();

      settings.debugPublisher = publisher;
      settings.classSettings = publisher.getClassSettings(className);

      // For some reason, the compiler doesn't see that
      // debugLogPublihser.getMethodSettings returns a parameterized Map.
      // This problem goes away if a parameterized verson of DebugLogPublisher
      // is used. However, we can't not use reflection to instantiate a generic
      // DebugLogPublisher<? extends DebugLogPublisherCfg> type. The only thing
      // we can do is to just supress the compiler warnings.
      settings.methodSettings = publisher.getMethodSettings(className);

      publisherSettings[i] = settings;
    }
  }
View Full Code Here

        new PublisherSettings[publishers.length];

    // Get the settings from all publishers.
    for(int i = 0; i < publishers.length; i++)
    {
      DebugLogPublisher publisher = publishers[i];
      PublisherSettings settings = new PublisherSettings();

      settings.debugPublisher = publisher;
      settings.classSettings = publisher.getClassSettings(className);

      // For some reason, the compiler doesn't see that
      // debugLogPublihser.getMethodSettings returns a parameterized Map.
      // This problem goes away if a parameterized verson of DebugLogPublisher
      // is used. However, we can't not use reflection to instantiate a generic
      // DebugLogPublisher<? extends DebugLogPublisherCfg> type. The only thing
      // we can do is to just supress the compiler warnings.
      settings.methodSettings = publisher.getMethodSettings(className);

      newSettings[i] = settings;
    }

    publisherSettings = newSettings;
View Full Code Here

      try
      {
        ErrorLogPublisher errorLogPublisher =
            TextErrorLogPublisher.getStartupTextErrorPublisher(
            new TextWriter.STREAM(out));
        DebugLogPublisher debugLogPublisher =
            TextDebugLogPublisher.getStartupTextDebugPublisher(
            new TextWriter.STREAM(out));
        ErrorLogger.addErrorLogPublisher(errorLogPublisher);
        DebugLogger.addDebugLogPublisher(debugLogPublisher);
      }
View Full Code Here

TOP

Related Classes of org.nasutekds.server.api.DebugLogPublisher

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.