Updated indentation

This commit is contained in:
Kiran 2016-10-09 13:55:26 -04:00 committed by GitHub
parent 53a353916b
commit fe9c63560d
1 changed files with 5 additions and 5 deletions

View File

@ -11,17 +11,17 @@ import org.springframework.jms.support.converter.MessageConverter;
public class SampleMessageConverter implements MessageConverter {
public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException {
Employee person = (Employee) object;
Employee employee = (Employee) object;
MapMessage message = session.createMapMessage();
message.setString("name", person.getName());
message.setInt("age", person.getAge());
message.setString("name", employee.getName());
message.setInt("age", employee.getAge());
return message;
}
public Object fromMessage(Message message) throws JMSException, MessageConversionException {
MapMessage mapMessage = (MapMessage) message;
Employee person = new Employee(mapMessage.getString("name"), mapMessage.getInt("age"));
return person;
Employee employee = new Employee(mapMessage.getString("name"), mapMessage.getInt("age"));
return employee;
}
}