org.apache.flume.event
Class SimpleEvent

java.lang.Object
  extended by org.apache.flume.event.SimpleEvent
All Implemented Interfaces:
Event

public class SimpleEvent
extends Object
implements Event


Constructor Summary
SimpleEvent()
           
 
Method Summary
 byte[] getBody()
          Returns the raw byte array of the data contained in this event.
 Map<String,String> getHeaders()
          Returns a map of name-value pairs describing the data stored in the body.
 void setBody(byte[] body)
          Sets the raw byte array of the data contained in this event.
 void setHeaders(Map<String,String> headers)
          Set the event headers
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleEvent

public SimpleEvent()
Method Detail

getHeaders

public Map<String,String> getHeaders()
Description copied from interface: Event
Returns a map of name-value pairs describing the data stored in the body.

Specified by:
getHeaders in interface Event

setHeaders

public void setHeaders(Map<String,String> headers)
Description copied from interface: Event
Set the event headers

Specified by:
setHeaders in interface Event
Parameters:
headers - Map of headers to replace the current headers.

getBody

public byte[] getBody()
Description copied from interface: Event
Returns the raw byte array of the data contained in this event.

Specified by:
getBody in interface Event

setBody

public void setBody(byte[] body)
Description copied from interface: Event
Sets the raw byte array of the data contained in this event.

Specified by:
setBody in interface Event
Parameters:
body - The data.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2014 Apache Software Foundation. All Rights Reserved.