Updated indentation
This commit is contained in:
parent
53a353916b
commit
fe9c63560d
|
@ -11,17 +11,17 @@ import org.springframework.jms.support.converter.MessageConverter;
|
||||||
public class SampleMessageConverter implements MessageConverter {
|
public class SampleMessageConverter implements MessageConverter {
|
||||||
|
|
||||||
public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException {
|
public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException {
|
||||||
Employee person = (Employee) object;
|
Employee employee = (Employee) object;
|
||||||
MapMessage message = session.createMapMessage();
|
MapMessage message = session.createMapMessage();
|
||||||
message.setString("name", person.getName());
|
message.setString("name", employee.getName());
|
||||||
message.setInt("age", person.getAge());
|
message.setInt("age", employee.getAge());
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object fromMessage(Message message) throws JMSException, MessageConversionException {
|
public Object fromMessage(Message message) throws JMSException, MessageConversionException {
|
||||||
MapMessage mapMessage = (MapMessage) message;
|
MapMessage mapMessage = (MapMessage) message;
|
||||||
Employee person = new Employee(mapMessage.getString("name"), mapMessage.getInt("age"));
|
Employee employee = new Employee(mapMessage.getString("name"), mapMessage.getInt("age"));
|
||||||
return person;
|
return employee;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue