org.krakenapps.filter
Class DefaultFilter

java.lang.Object
  extended by org.krakenapps.filter.DefaultFilter
All Implemented Interfaces:
Filter
Direct Known Subclasses:
ActiveFilter

public class DefaultFilter
extends java.lang.Object
implements Filter

This class provides default implementations for the Filter interface.

Since:
1.0.0
Author:
xeraph

Constructor Summary
DefaultFilter()
          Creates a new default filter instance.
 
Method Summary
 MessageSpec[] getInputMessageSpecs()
          No input message specifications are supported by default.
 MessageSpec getOutputMessageSpec()
          No output message specification is supported by default.
 java.lang.Object getProperty(java.lang.String key)
          Returns the value of the specified property.
 java.util.Set<java.lang.String> getPropertyKeys()
          Returns a key set of properties.
 void process(Message message)
          Empty message processing by default.
 void setProperty(java.lang.String key, java.lang.Object value)
          Sets a property.
 void unsetProperty(java.lang.String key)
          Removes the property.
 void validateConfiguration()
          Validates current configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFilter

public DefaultFilter()
Creates a new default filter instance.

Method Detail

getInputMessageSpecs

public MessageSpec[] getInputMessageSpecs()
No input message specifications are supported by default. Override this.

Specified by:
getInputMessageSpecs in interface Filter
Returns:
the input message specifications array. null or empty array if no types are supported

getOutputMessageSpec

public MessageSpec getOutputMessageSpec()
No output message specification is supported by default. Override this.

Specified by:
getOutputMessageSpec in interface Filter
Returns:
the output message specification. null if no type is supported

process

public void process(Message message)
Empty message processing by default. Override this.

Specified by:
process in interface Filter

getProperty

public java.lang.Object getProperty(java.lang.String key)
Returns the value of the specified property.

Specified by:
getProperty in interface Filter
Parameters:
key - the name of the property
Returns:
the value of specified property

getPropertyKeys

public java.util.Set<java.lang.String> getPropertyKeys()
Returns a key set of properties.

Specified by:
getPropertyKeys in interface Filter

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
Sets a property.

Specified by:
setProperty in interface Filter
Parameters:
key - the name of the property
value - the value of the property

unsetProperty

public void unsetProperty(java.lang.String key)
Removes the property.

Specified by:
unsetProperty in interface Filter
Parameters:
key - the name of the property

validateConfiguration

public void validateConfiguration()
                           throws ConfigurationException
Validates current configuration. No check by default. Override this.

Specified by:
validateConfiguration in interface Filter
Throws:
ConfigurationException - if failed to validate


Copyright © 2008-2009 Kraken Project. All Rights Reserved.