1
package org.jboss.remoting.samples.transporter.multiple;
3
import java.util.Random;
7
* @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
9
public class CustomerProcessorImpl implements CustomerProcessor
12
* Takes the customer passed, and if not null and customer id
13
* is less than 0, will create a new random id and set it.
14
* The customer object returned will be the modified customer
20
public Customer processCustomer(Customer customer)
22
if(customer != null && customer.getCustomerId() < 0)
24
customer.setCustomerId(new Random().nextInt(1000));
26
System.out.println("processed customer with new id of " + customer.getCustomerId());