|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.apama.event.parser.EventParser
public class EventParser
Provides the functionality to parse String
objects into Apama Event
objects, for
any EventType
registered with the parser.
Threading: The EventParser is thread-safe.
See the EventType
documentation for an example of how event strings may be parsed
using this class.
Constructor Summary | |
---|---|
EventParser(EventType... types)
Constructor to create an EventParser. |
Method Summary | |
---|---|
void |
deregisterEventType(EventType type)
Deregister the given event type from being a valid type this parser. |
static EventParser |
getDefaultParser()
Singleton method for retrieving the default (singleton) EventParser. |
EventType |
getEventType(java.lang.String name)
Retrieve an Event 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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventParser(EventType... types)
types
- Optional parameter for automatically registering a set of initial event types with the parser.Method Detail |
---|
public static EventParser getDefaultParser()
public void registerEventType(EventType type)
type
- the event type to parsepublic void deregisterEventType(EventType type)
type
- the event type to parsepublic EventType getEventType(java.lang.String name)
name
- the name of the EventType
public Event parse(java.lang.String eventString) throws ParserRuntimeException
eventString
- the string representation of the event
ParserRuntimeException
- 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 process
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |