Package org.opennms.core.camel
Class IndexNameFunction
- java.lang.Object
-
- org.opennms.core.camel.IndexNameFunction
-
- All Implemented Interfaces:
org.apache.camel.component.properties.PropertiesFunction
public class IndexNameFunction extends Object implements org.apache.camel.component.properties.PropertiesFunction
The apply method is called on each message to determine in which Elasticsearch index messages should end up into. http://unicolet.blogspot.com/2015/01/camel-elasticsearch-create-timestamped.html Created: User: unicoletti Date: 11:12 AM 6/24/15
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_INDEX_DATE_FORMAT
-
Constructor Summary
Constructors Constructor Description IndexNameFunction()IndexNameFunction(String dateFormat)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringapply(String remainder)Stringapply(String remainder, Date date)static Stringapply(SimpleDateFormat df, String remainder, Date date)StringgetName()
-
-
-
Field Detail
-
DEFAULT_INDEX_DATE_FORMAT
public static final String DEFAULT_INDEX_DATE_FORMAT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IndexNameFunction
public IndexNameFunction()
-
IndexNameFunction
public IndexNameFunction(String dateFormat)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.apache.camel.component.properties.PropertiesFunction
-
apply
public String apply(String remainder)
- Specified by:
applyin interfaceorg.apache.camel.component.properties.PropertiesFunction
-
apply
public static String apply(SimpleDateFormat df, String remainder, Date date)
-
-