org.okiproject.serviceapi.logging
Interface LogServiceFactory

All Superinterfaces:
java.io.Serializable

public interface LogServiceFactory
extends java.io.Serializable

Purpose: Represents the factory used to create instances of LogService, which will typically be a singleton, per JVM.

Copyright (c) 2001 Massachusetts Institute of Technology

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

$Source: /cvs/oki/org/okiproject/serviceapi/doc/logging/org/okiproject/serviceapi/logging/LogServiceFactory.html,v $


Method Summary
 void destroy(org.okiproject.serviceapi.common.Agent who)
          Lifecycle method.
 void destroy(org.okiproject.serviceapi.common.Agent who, java.lang.String lname)
          Lifecycle method.
 LogServiceFactory getFactory(org.okiproject.serviceapi.common.Agent who, java.lang.String lname, java.util.Properties properties)
          Gets a LogServiceFactory (including a default LogServiceFactory), with properties described via an associated properties hash.
 LogServiceFactory getFactory(org.okiproject.serviceapi.common.Agent who, java.lang.String lname, java.lang.String configFileName)
          Gets a LogServiceFactory (including a default LogServiceFactory), with properties described via an associated Properties file, XML file, or PropertyResourceBundle
 LogService getLogService(org.okiproject.serviceapi.common.Agent who, java.lang.String lname, java.util.Properties properties)
          Gets a specific LogService configured according to properties described by an associated properties hashtable.
 LogService getLogService(org.okiproject.serviceapi.common.Agent who, java.lang.String lname, java.lang.String configFileName)
          Gets a specific LogService configured according to properties described by an associated configuration file.
 void init(org.okiproject.serviceapi.common.Agent who, java.lang.String lname, java.util.Properties properties)
          Lifecycle method.
 void init(org.okiproject.serviceapi.common.Agent who, java.lang.String lname, java.lang.String configFileName)
          Lifecycle method.
 

Method Detail

init

public void init(org.okiproject.serviceapi.common.Agent who,
                 java.lang.String lname,
                 java.util.Properties properties)
          throws LogServiceFactoryException
Lifecycle method. Initializes the logging service via a Properties hash mechanism.
Parameters:
who - Represents the Agent state for authn/authz purposes.
lname - Represents a logical name or moniker
properties - Represents a properties associative array.
Throws:
LogServiceFactoryException - if some error occurs while configuring the logging subsystem.

init

public void init(org.okiproject.serviceapi.common.Agent who,
                 java.lang.String lname,
                 java.lang.String configFileName)
          throws LogServiceFactoryException
Lifecycle method. Initializes the logging service via a config file (possibly XML), Properties file, PropertyResourceBundle, or other configuration mechanism.
Parameters:
who - Represents the Agent state for authn/authz purposes.
lname - Represents a logical name or moniker
configFileName - Represents a config file (possibly XML).
Throws:
LogServiceFactoryException - if some error occurs while configuring the logging subsystem.

getFactory

public LogServiceFactory getFactory(org.okiproject.serviceapi.common.Agent who,
                                    java.lang.String lname,
                                    java.lang.String configFileName)
                             throws LogServiceFactoryException
Gets a LogServiceFactory (including a default LogServiceFactory), with properties described via an associated Properties file, XML file, or PropertyResourceBundle
Parameters:
who - Represents the Agent state for authn/authz purposes.
lname - Represents a logical name or moniker
configFileName - Represents a config file (possibly XML).
Returns:
 
Throws:
LogServiceFactoryException - if some error occurs while configuring the logging subsystem.

getFactory

public LogServiceFactory getFactory(org.okiproject.serviceapi.common.Agent who,
                                    java.lang.String lname,
                                    java.util.Properties properties)
                             throws LogServiceFactoryException
Gets a LogServiceFactory (including a default LogServiceFactory), with properties described via an associated properties hash.
Parameters:
who - Represents the Agent state for authn/authz purposes.
lname - Represents a logical name or moniker
properties - Represents a properties associative array.
Returns:
 
Throws:
LogServiceFactoryException - if some error occurs while configuring the logging factory.

getLogService

public LogService getLogService(org.okiproject.serviceapi.common.Agent who,
                                java.lang.String lname,
                                java.lang.String configFileName)
                         throws LogServiceFactoryException
Gets a specific LogService configured according to properties described by an associated configuration file.
Parameters:
who - Represents the Agent state for authn/authz purposes.
lname - Represents a logical name or moniker
configFileName - Represents a config file (possibly XML).
Returns:
 
Throws:
LogServiceFactoryException - if some error occurs while configuring the LogService.

getLogService

public LogService getLogService(org.okiproject.serviceapi.common.Agent who,
                                java.lang.String lname,
                                java.util.Properties properties)
                         throws LogServiceFactoryException
Gets a specific LogService configured according to properties described by an associated properties hashtable.
Parameters:
who - Represents the Agent state for authn/authz purposes.
lname - Represents a logical name or moniker
properties - Represents an associated hash.
Returns:
 
Throws:
LogServiceFactoryException - if some error occurs while configuring the LogService.

destroy

public void destroy(org.okiproject.serviceapi.common.Agent who)
             throws LogServiceFactoryException
Lifecycle method. Frees up resources, cleans up and closes the logging service.
Parameters:
who - Represents the Agent state for authn/authz purposes.
Throws:
LogServiceFactoryException - if some error occurs while quiescing the logging subsystem.

destroy

public void destroy(org.okiproject.serviceapi.common.Agent who,
                    java.lang.String lname)
             throws LogServiceFactoryException
Lifecycle method. Frees up resources, cleans up and closes the logging service.
Parameters:
who - Represents the Agent state for authn/authz purposes.
lname - Represents a logical name or moniker
Throws:
LogServiceFactoryException - if some error occurs while quiescing the logging subsystem.