com.espertech.esper.client.util
Interface EventRenderer

All Known Implementing Classes:
EventRendererImpl

public interface EventRenderer

Provider for rendering services of EventBean events.


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.
 

Method Detail

getJSONRenderer

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

Parameters:
eventType - to return renderer for
options - rendering options
Returns:
JSON format renderer

getJSONRenderer

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

Parameters:
eventType - to return renderer for
Returns:
JSON format renderer

renderJSON

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.

Parameters:
title - the JSON root title
theEvent - the event to render
Returns:
JSON formatted text

renderJSON

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.

Parameters:
title - the JSON root title
theEvent - the event to render
options - are JSON rendering options
Returns:
JSON formatted text

getXMLRenderer

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

Parameters:
eventType - to return renderer for
Returns:
XML format renderer

getXMLRenderer

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

Parameters:
eventType - to return renderer for
options - rendering options
Returns:
XML format renderer

renderXML

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.

Parameters:
rootElementName - the root element name that may also include namespace information
theEvent - the event to render
Returns:
XML formatted text

renderXML

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.

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