public class EventParser
extends java.lang.Object
Constructor and Description |
---|
EventParser(EventType... types)
Constructor to create an EventParser.
|
Modifier and Type | Method and Description |
---|---|
void |
deregisterEventType(EventType type)
Deregister the given event type from being a valid type this parser.
|
static EventParser |
getDefaultParser()
Deprecated.
|
EventType |
getEventType(java.lang.String name)
Retrieve an Event Type by name.
|
FieldType<?> |
getType(java.lang.String typeName)
Retrieve a Type by name.
|
static java.lang.String |
getTypeName(java.lang.String eventString)
Method to extract and return the event type name from an event string.
|
Event |
parse(java.lang.String eventString)
Parse an event string.
|
void |
registerEventType(EventType type)
Register the given event type as being a valid type this parser
recognizes.
|
void |
registerType(FieldType<?> fieldType)
Register the given field type as being a valid type this parser recognizes.
|
public EventParser(EventType... types)
types
- Optional parameter for automatically registering a set of initial event types with the parser.@Deprecated public static EventParser getDefaultParser()
public void registerEventType(EventType type)
type
- the event type to parsepublic FieldType<?> getType(java.lang.String typeName)
typeName
- The name of the Typepublic void registerType(FieldType<?> fieldType)
type
- the field type to registerpublic void deregisterEventType(EventType type)
type
- the event type to parsepublic EventType getEventType(java.lang.String name)
name
- the name of the EventTypepublic Event parse(java.lang.String eventString) throws ParserRuntimeException
eventString
- the string representation of the eventParserRuntimeException
- if the event string is invalid, or if the EventType of the
specified event has not been registered with this EventParser.public static java.lang.String getTypeName(java.lang.String eventString)
eventString
- the event string to processSubmit a bug or feature
Copyright (c) 2013-2020 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.