Class Events


  • public class Events
    extends Object
    Utility methods for event handling.
    Since:
    1.2.0
    Author:
    Michael Nitschinger
    • Constructor Detail

      • Events

        public Events()
    • Method Detail

      • identityMap

        public static Map<String,​Object> identityMap​(CouchbaseEvent source)
        Takes a CouchbaseEvent and returns a map with event information.
        Parameters:
        source - the source event.
        Returns:
        a new map which contains name and type info in an event sub-map.
      • toJson

        public static String toJson​(CouchbaseEvent source,
                                    boolean pretty)
        Takes a CouchbaseEvent and generates a JSON string.
        Parameters:
        source - the source event.
        pretty - if pretty print should be used.
        Returns:
        the generated json string.