public abstract class BaseOutputWriter extends java.lang.Object implements OutputWriter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BINARY_PATH |
static java.lang.String |
DEBUG |
static java.lang.String |
HOST |
static java.lang.String |
OUTPUT_FILE |
static java.lang.String |
PORT |
static java.lang.String |
TEMPLATE_FILE |
static java.lang.String |
TYPE_NAMES |
Constructor and Description |
---|
BaseOutputWriter() |
Modifier and Type | Method and Description |
---|---|
void |
addSetting(java.lang.String key,
java.lang.Object value) |
void |
addTypeName(java.lang.String str) |
protected java.lang.String |
cleanupStr(java.lang.String name)
Replaces all . with _ and removes all spaces and double/single quotes.
|
java.lang.Boolean |
getBooleanSetting(java.lang.String key)
Returns a boolean value for the key, defaults to false if not specified.
|
java.lang.Boolean |
getBooleanSetting(java.lang.String key,
java.lang.Boolean defaultVal)
Gets a Boolean value for the key, returning the default value given if
not specified or not a valid boolean value.
|
protected java.lang.String |
getConcatedTypeNameValues(java.lang.String typeNameStr)
Given a typeName string, get the first match from the typeNames setting.
|
java.lang.Integer |
getIntegerSetting(java.lang.String key,
java.lang.Integer defaultVal)
Gets an Integer value for the key, returning the default value given if
not specified or not a valid numeric value.
|
protected int |
getIntSetting(java.lang.String key,
int defaultVal)
Gets an int value for the setting, returning the default value if not
specified.
|
java.util.Map<java.lang.String,java.lang.Object> |
getSettings()
Settings allow you to configure your Writers with whatever they might
need.
|
java.lang.String |
getStringSetting(java.lang.String key,
java.lang.String defaultVal)
Gets a String value for the setting, returning the default value if not
specified.
|
java.util.List<java.lang.String> |
getTypeNames() |
boolean |
isDebugEnabled() |
void |
setObjectPoolMap(java.util.Map<java.lang.String,org.apache.commons.pool.KeyedObjectPool> poolMap)
A do nothing method.
|
void |
setSettings(java.util.Map<java.lang.String,java.lang.Object> settings)
Settings allow you to configure your Writers with whatever they might
need.
|
void |
setTypeNames(java.util.List<java.lang.String> typeNames) |
void |
start()
A do nothing method.
|
void |
stop()
A do nothing method.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doWrite, validateSetup
public static final java.lang.String HOST
public static final java.lang.String PORT
public static final java.lang.String OUTPUT_FILE
public static final java.lang.String TEMPLATE_FILE
public static final java.lang.String BINARY_PATH
public static final java.lang.String DEBUG
public static final java.lang.String TYPE_NAMES
public void addSetting(java.lang.String key, java.lang.Object value)
public java.util.Map<java.lang.String,java.lang.Object> getSettings()
OutputWriter
getSettings
in interface OutputWriter
public void setSettings(java.util.Map<java.lang.String,java.lang.Object> settings)
OutputWriter
setSettings
in interface OutputWriter
public java.lang.Boolean getBooleanSetting(java.lang.String key)
getBooleanSetting(key,false)
.key
- the key value to get the boolean setting forpublic java.lang.Boolean getBooleanSetting(java.lang.String key, java.lang.Boolean defaultVal)
key
- the key to get the boolean setting fordefaultVal
- the default value to return if the setting was not specified
or was not coercible to a Boolean valuepublic java.lang.Integer getIntegerSetting(java.lang.String key, java.lang.Integer defaultVal)
key
- the key to get the Integer setting fordefaultVal
- the default value to return if the setting was not specified
or was not coercible to an Integer valuepublic java.lang.String getStringSetting(java.lang.String key, java.lang.String defaultVal)
key
- the key to get the String setting fordefaultVal
- the default value to return if the setting was not specifiedprotected int getIntSetting(java.lang.String key, int defaultVal) throws java.lang.IllegalArgumentException
key
- the key to get the int value fordefaultVal
- default value if the setting was not specifiedjava.lang.IllegalArgumentException
- if setting does not contain an intpublic boolean isDebugEnabled()
public void setTypeNames(java.util.List<java.lang.String> typeNames)
public java.util.List<java.lang.String> getTypeNames()
public void addTypeName(java.lang.String str)
protected java.lang.String getConcatedTypeNameValues(java.lang.String typeNameStr)
protected java.lang.String cleanupStr(java.lang.String name)
public void setObjectPoolMap(java.util.Map<java.lang.String,org.apache.commons.pool.KeyedObjectPool> poolMap)
setObjectPoolMap
in interface OutputWriter
public void start() throws LifecycleException
start
in interface OutputWriter
LifecycleException
public void stop() throws LifecycleException
stop
in interface OutputWriter
LifecycleException
Copyright © 2013 Jon Stevens and a gang of pencils. All Rights Reserved. Build version: 20130828-162948-517c4427f5