Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. public class Envelope {
  2.  
  3. private Object body;
  4. private long timestamp;
  5. private int retries;
  6.  
  7. public Envelope() { }
  8.  
  9. public Envelope(Object body) {
  10. this(body, System.currentTimeMillis());
  11. }
  12.  
  13. public Envelope(Object body, long timestamp) {
  14. this(body, timestamp, 0);
  15. }
  16.  
  17. public Envelope(Object body, long timestamp, int retries) {
  18. this.body = body;
  19. this.timestamp = timestamp;
  20. this.retries = retries;
  21. }
  22.  
  23. public Object getBody() {
  24. return body;
  25. }
  26.  
  27. public void setBody(Object body) {
  28. this.body = body;
  29. }
  30.  
  31. public long getTimestamp() {
  32. return timestamp;
  33. }
  34.  
  35. public void setTimestamp(long timestamp) {
  36. this.timestamp = timestamp;
  37. }
  38.  
  39. public int getRetries() {
  40. return retries;
  41. }
  42.  
  43. public void setRetries(int retries) {
  44. this.retries = retries;
  45. }
  46.  
  47. public String toString() {
  48. return ReflectionToStringBuilder.toString(this);
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement