Spring Integration

org.springframework.integration.ip.tcp
Class SocketMessageMapper

java.lang.Object
  extended by org.springframework.integration.ip.tcp.SocketMessageMapper
All Implemented Interfaces:
InboundMessageMapper<SocketReader>, OutboundMessageMapper<Object>

public class SocketMessageMapper
extends Object
implements InboundMessageMapper<SocketReader>, OutboundMessageMapper<Object>

Maps incoming data from a SocketReader to a Message and from a Message to outgoing data forwarded to a SocketWriter.

Author:
Gary Russell

Constructor Summary
SocketMessageMapper()
           
 
Method Summary
 Object fromMessage(Message<?> message)
           
 void setCharset(String charset)
           
 void setMessageFormat(int messageFormat)
           
 Message<Object> toMessage(SocketReader socketReader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketMessageMapper

public SocketMessageMapper()
Method Detail

toMessage

public Message<Object> toMessage(SocketReader socketReader)
                          throws Exception
Specified by:
toMessage in interface InboundMessageMapper<SocketReader>
Throws:
Exception

fromMessage

public Object fromMessage(Message<?> message)
                   throws Exception
Specified by:
fromMessage in interface OutboundMessageMapper<Object>
Throws:
Exception

setCharset

public void setCharset(String charset)
Parameters:
charset - the charset to set

setMessageFormat

public void setMessageFormat(int messageFormat)

Spring Integration

Copyright © 2010. All Rights Reserved.