org.talend.esb.sam.common.handler.impl
Class ContentLengthHandler

java.lang.Object
  extended by org.talend.esb.sam.common.handler.impl.ContentLengthHandler
All Implemented Interfaces:
EventHandler

public class ContentLengthHandler
extends Object
implements EventHandler

Content length handler is able to cut the message content within an event. Set the maximum length with setLength. If content is cut it's stored inside

Author:
cschmuelling

Constructor Summary
ContentLengthHandler()
          Instantiates a new content length handler.
 
Method Summary
 int getLength()
          Gets the length.
 void handleEvent(Event event)
          Cut the message content to the configured length.
 void setLength(int length)
          Set the maximum length for the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentLengthHandler

public ContentLengthHandler()
Instantiates a new content length handler.

Method Detail

getLength

public int getLength()
Gets the length.

Returns:
the length

setLength

public void setLength(int length)
Set the maximum length for the message.

Parameters:
length - the new length

handleEvent

public void handleEvent(Event event)
Cut the message content to the configured length.

Specified by:
handleEvent in interface EventHandler
Parameters:
event - the event


Copyright © 2011–2014 Talend Inc.. All rights reserved.