com.espertech.esper.event.util
Class EventRendererImpl

java.lang.Object
  extended by com.espertech.esper.event.util.EventRendererImpl
All Implemented Interfaces:
EventRenderer

public class EventRendererImpl
extends java.lang.Object
implements EventRenderer

Provider for rendering services of EventBean events.


Constructor Summary
EventRendererImpl()
           
 
Method Summary
 JSONEventRenderer getJSONRenderer(EventType eventType)
          Returns a render for the JSON format, valid only for the given event type and its subtypes.
 JSONEventRenderer getJSONRenderer(EventType eventType, JSONRenderingOptions options)
          Returns a render for the JSON format, valid only for the given event type and its subtypes.
 XMLEventRenderer getXMLRenderer(EventType eventType)
          Returns a render for the XML format, valid only for the given event type and its subtypes.
 XMLEventRenderer getXMLRenderer(EventType eventType, XMLRenderingOptions options)
          Returns a render for the XML format, valid only for the given event type and its subtypes.
 java.lang.String renderJSON(java.lang.String title, EventBean theEvent)
          Quick-access method to render a given event in the JSON format.
 java.lang.String renderJSON(java.lang.String title, EventBean theEvent, JSONRenderingOptions options)
          Quick-access method to render a given event in the JSON format.
 java.lang.String renderXML(java.lang.String rootElementName, EventBean theEvent)
          Quick-access method to render a given event in the XML format.
 java.lang.String renderXML(java.lang.String rootElementName, EventBean theEvent, XMLRenderingOptions options)
          Quick-access method to render a given event in the XML format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventRendererImpl

public EventRendererImpl()
Method Detail

getJSONRenderer

public JSONEventRenderer getJSONRenderer(EventType eventType,
                                         JSONRenderingOptions options)
Returns a render for the JSON format, valid only for the given event type and its subtypes.

Specified by:
getJSONRenderer in interface EventRenderer
Parameters:
eventType - to return renderer for
options - rendering options
Returns:
JSON format renderer

getJSONRenderer

public JSONEventRenderer getJSONRenderer(EventType eventType)
Returns a render for the JSON format, valid only for the given event type and its subtypes.

Specified by:
getJSONRenderer in interface EventRenderer
Parameters:
eventType - to return renderer for
Returns:
JSON format renderer

renderJSON

public java.lang.String renderJSON(java.lang.String title,
                                   EventBean theEvent)
Quick-access method to render a given event in the JSON format.

Use the #getJSONRenderer to obtain a renderer instance that allows repeated rendering of the same type of event. For performance reasons obtaining a dedicated renderer instance is the preferred method compared to repeated rendering via this method.

Specified by:
renderJSON in interface EventRenderer
Parameters:
title - the JSON root title
theEvent - the event to render
Returns:
JSON formatted text

renderJSON

public java.lang.String renderJSON(java.lang.String title,
                                   EventBean theEvent,
                                   JSONRenderingOptions options)
Quick-access method to render a given event in the JSON format.

Use the #getJSONRenderer to obtain a renderer instance that allows repeated rendering of the same type of event. For performance reasons obtaining a dedicated renderer instance is the preferred method compared to repeated rendering via this method.

Specified by:
renderJSON in interface EventRenderer
Parameters:
title - the JSON root title
theEvent - the event to render
options - are JSON rendering options
Returns:
JSON formatted text

getXMLRenderer

public XMLEventRenderer getXMLRenderer(EventType eventType)
Returns a render for the XML format, valid only for the given event type and its subtypes.

Specified by:
getXMLRenderer in interface EventRenderer
Parameters:
eventType - to return renderer for
Returns:
XML format renderer

getXMLRenderer

public XMLEventRenderer getXMLRenderer(EventType eventType,
                                       XMLRenderingOptions options)
Returns a render for the XML format, valid only for the given event type and its subtypes.

Specified by:
getXMLRenderer in interface EventRenderer
Parameters:
eventType - to return renderer for
options - rendering options
Returns:
XML format renderer

renderXML

public java.lang.String renderXML(java.lang.String rootElementName,
                                  EventBean theEvent)
Quick-access method to render a given event in the XML format.

Use the #getXMLRenderer to obtain a renderer instance that allows repeated rendering of the same type of event. For performance reasons obtaining a dedicated renderer instance is the preferred method compared to repeated rendering via this method.

Specified by:
renderXML in interface EventRenderer
Parameters:
rootElementName - the root element name that may also include namespace information
theEvent - the event to render
Returns:
XML formatted text

renderXML

public java.lang.String renderXML(java.lang.String rootElementName,
                                  EventBean theEvent,
                                  XMLRenderingOptions options)
Quick-access method to render a given event in the XML format.

Use the #getXMLRenderer to obtain a renderer instance that allows repeated rendering of the same type of event. For performance reasons obtaining a dedicated renderer instance is the preferred method compared to repeated rendering via this method.

Specified by:
renderXML in interface EventRenderer
Parameters:
rootElementName - the root element name that may also include namespace information
theEvent - the event to render
options - are XML rendering options
Returns:
XML formatted text

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com