Class LogConfigReader

  • All Implemented Interfaces:
    ServiceListener

    public class LogConfigReader
    extends Object
    implements ServiceListener
    LogConfigReader is used to load the configuration from the Directory Server and store the configuration as Properties of LogManager.

    LogConfigReader is very Speicific to DSAME.

    java.util.logging.config.class System property should point to this class, since LogManager uses this property instantiates this class to load the configuration.

    • Field Detail

      • localLogServiceID

        public static String localLogServiceID
        Local Log service identifier
    • Constructor Detail

      • LogConfigReader

        public LogConfigReader()
                        throws IOException
        The constructor loads the configuration from the DS using DSAME SDK. Constructs a String as "key=value CRLF" for each AttributeSchema in the amLogging.xml. In case the AttributeSchema has multiple values or a List, it gets converted to a "," seperated String.

        Example1: iplanet-am-logging-backend=FILE \r\n

        Example2: iplanet-am-logging-logfields=TIME, DOMAIN, IPADDR, HOSTNAME, DATA, LEVEL, LOGINID \r\n

        The input stream hence constructed is converted into a ByteArrayInputStream and is loaded into LogManager.

        Throws:
        IOException
    • Method Detail

      • globalConfigChanged

        public void globalConfigChanged​(String servName,
                                        String ver,
                                        String frpName,
                                        String servComp,
                                        int type)
        Description copied from interface: ServiceListener
        This method will be invoked when a service's global configuration data has been changed. The parameter groupName denote the name of the configuration grouping (e.g. default) and serviceComponent denotes the service's sub-component that changed (e.g. /NamedPolicy, /Templates).
        Specified by:
        globalConfigChanged in interface ServiceListener
        Parameters:
        servName - name of the service.
        ver - version of the service.
        frpName - name of the configuration grouping.
        servComp - name of the service components that changed.
        type - change type, i.e., ADDED, REMOVED or MODIFIED.
      • organizationConfigChanged

        public void organizationConfigChanged​(String servName,
                                              String ver,
                                              String orgName,
                                              String grpName,
                                              String servComp,
                                              int type)
        Description copied from interface: ServiceListener
        This method will be invoked when a service's organization configuration data has been changed. The parameters orgName, groupName and serviceComponent denotes the organization name, configuration grouping name and service's sub-component that are changed respectively.
        Specified by:
        organizationConfigChanged in interface ServiceListener
        Parameters:
        servName - name of the service
        ver - version of the service
        orgName - organization name as DN
        grpName - name of the configuration grouping
        servComp - the name of the service components that changed
        type - change type, i.e., ADDED, REMOVED or MODIFIED
      • schemaChanged

        public void schemaChanged​(String servName,
                                  String ver)
        Description copied from interface: ServiceListener
        This method will be invoked when a service's schema has been changed.
        Specified by:
        schemaChanged in interface ServiceListener
        Parameters:
        servName - name of the service
        ver - version of the service