~ubuntu-branches/ubuntu/raring/libjboss-remoting-java/raring

« back to all changes in this revision

Viewing changes to examples/org/jboss/remoting/samples/transporter/multiple/CustomerProcessorImpl.java

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-09-09 14:01:03 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110909140103-hqokx61534tas9rg
Tags: 2.5.3.SP1-1
* Newer but not newest upstream release. Do not build samples.
* Change debian/watch to upstream's svn repo.
* Add patch to fix compile error caused by tomcat update.
  (Closes: #628303)
* Switch to source format 3.0.
* Switch to debhelper level 7.
* Remove useless Depends.
* Update Standards-Version: 3.9.2.
* Update README.source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package org.jboss.remoting.samples.transporter.multiple;
2
 
 
3
 
import java.util.Random;
4
 
 
5
 
 
6
 
/**
7
 
 * @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
8
 
 */
9
 
public class CustomerProcessorImpl implements CustomerProcessor
10
 
{
11
 
   /**
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
15
 
    * object passed.
16
 
    *
17
 
    * @param customer
18
 
    * @return
19
 
    */
20
 
   public Customer processCustomer(Customer customer)
21
 
   {
22
 
      if(customer != null && customer.getCustomerId() < 0)
23
 
      {
24
 
         customer.setCustomerId(new Random().nextInt(1000));
25
 
      }
26
 
      System.out.println("processed customer with new id of " + customer.getCustomerId());
27
 
      return customer;
28
 
   }
29
 
 
30
 
}