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 java.lang.Object implements org.apache.camel.component.properties.PropertiesFunctionThe 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 java.lang.StringDEFAULT_INDEX_DATE_FORMAT
-
Constructor Summary
Constructors Constructor Description IndexNameFunction()IndexNameFunction(java.lang.String dateFormat)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringapply(java.lang.String remainder)java.lang.Stringapply(java.lang.String remainder, java.util.Date date)static java.lang.Stringapply(java.text.SimpleDateFormat df, java.lang.String remainder, java.util.Date date)java.lang.StringgetName()
-
-
-
Field Detail
-
DEFAULT_INDEX_DATE_FORMAT
public static final java.lang.String DEFAULT_INDEX_DATE_FORMAT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceorg.apache.camel.component.properties.PropertiesFunction
-
apply
public java.lang.String apply(java.lang.String remainder)
- Specified by:
applyin interfaceorg.apache.camel.component.properties.PropertiesFunction
-
apply
public java.lang.String apply(java.lang.String remainder, java.util.Date date)
-
apply
public static java.lang.String apply(java.text.SimpleDateFormat df, java.lang.String remainder, java.util.Date date)
-
-