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 String
DEFAULT_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 String
apply(String remainder)
String
apply(String remainder, Date date)
static String
apply(SimpleDateFormat df, String remainder, Date date)
String
getName()
-
-
-
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:
getName
in interfaceorg.apache.camel.component.properties.PropertiesFunction
-
apply
public String apply(String remainder)
- Specified by:
apply
in interfaceorg.apache.camel.component.properties.PropertiesFunction
-
apply
public static String apply(SimpleDateFormat df, String remainder, Date date)
-
-