PTLog API - 1.0

jp.ne.dti.lares.foozy.ptlog.writer
Class PropertiesProviderConfig

java.lang.Object
  extended byjp.ne.dti.lares.foozy.ptlog.writer.PropertiesProviderConfig

public class PropertiesProviderConfig
extends java.lang.Object

Configuration utility to configure all together.

This is provided for convenience to configure WriterProvider by PropertiesConverterConfig, PropertiesFilterConfig and PropertiesFormatterConfig all together.


Field Summary
static PropertiesProviderConfig ALLOW_FAILURE
          Convenience to use this class without construction.
static PropertiesProviderConfig DISALLOW_FAILURE
          Convenience to use this class without construction.
 
Constructor Summary
PropertiesProviderConfig()
          Constructor.
PropertiesProviderConfig(boolean allowFailure)
          Constructor.
 
Method Summary
 void config(WriterProvider provider, java.io.InputStream stream)
          Configure WriterProvider by properties from specified stream.
 void config(WriterProvider provider, java.util.Properties properties)
          Configure WriterProvider by specified properties.
 void config(WriterProvider provider, java.lang.String filename)
          Configure WriterProvider by properties from specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOW_FAILURE

public static final PropertiesProviderConfig ALLOW_FAILURE
Convenience to use this class without construction.

This allows failure in configuration process.


DISALLOW_FAILURE

public static final PropertiesProviderConfig DISALLOW_FAILURE
Convenience to use this class without construction.

This does not allow failure in configuration process.

Constructor Detail

PropertiesProviderConfig

public PropertiesProviderConfig(boolean allowFailure)
Constructor.

For resource efficiency, please use ALLOW_FAILURE or DISALLOW_FAILURE instead of NEW-ing, except of invocation from derived classes.

Parameters:
allowFailure - whether failure in configuration process or not.

PropertiesProviderConfig

public PropertiesProviderConfig()
Constructor.

This is equivalent to PropertiesProviderConfig(false).

Method Detail

config

public final void config(WriterProvider provider,
                         java.util.Properties properties)
Configure WriterProvider by specified properties.

Parameters:
properties - containing provider configuration
provider - to be configured

config

public final void config(WriterProvider provider,
                         java.io.InputStream stream)
                  throws java.io.IOException
Configure WriterProvider by properties from specified stream.

ATTENTION:Stream closing is not responsibility of this class but of caller side.

Parameters:
provider - to be configured
stream - to load data into properties.
Throws:
java.io.IOException

config

public final void config(WriterProvider provider,
                         java.lang.String filename)
                  throws java.io.IOException
Configure WriterProvider by properties from specified file.

Parameters:
provider - to be configured
filename - to load data into properties.
Throws:
java.io.IOException

PTLog API - 1.0