1
2
3
4
5
6
7
8
9
10 package org.apache.commons.messagelet.model;
11
12 import javax.jms.MessageListener;
13
14 import org.apache.commons.messagelet.ConsumerThread;
15
16
17
18
19
20
21
22 public class Subscription {
23
24
25 private String connection;
26
27
28 private String subject;
29
30
31 private String selector;
32
33
34 private MessageListener messageListener;
35
36
37 private String servlet;
38
39
40 private ConsumerThread consumerThread;
41
42 public Subscription() {
43 }
44
45
46
47
48 public String getConnection() {
49 return connection;
50 }
51
52
53
54
55 public void setConnection(String connection) {
56 this.connection = connection;
57 }
58
59
60
61
62 public String getSubject() {
63 return subject;
64 }
65
66
67
68
69 public void setSubject(String subject) {
70 this.subject = subject;
71 }
72
73
74
75
76 public String getSelector() {
77 return selector;
78 }
79
80
81
82
83 public void setSelector(String selector) {
84 this.selector = selector;
85 }
86
87
88
89
90 public MessageListener getMessageListener() {
91 return messageListener;
92 }
93
94
95
96
97 public void setMessageListener(MessageListener messageListener) {
98 this.messageListener = messageListener;
99 }
100
101
102
103
104
105 public String getServlet() {
106 return servlet;
107 }
108
109
110
111
112 public void setServlet(String servlet) {
113 this.servlet = servlet;
114 }
115
116
117
118
119
120
121 public ConsumerThread getConsumerThread() {
122 return consumerThread;
123 }
124
125
126
127
128
129 public void setConsumerThread(ConsumerThread consumerThread) {
130 this.consumerThread = consumerThread;
131 }
132
133
134 public String toString() {
135 StringBuffer buffer = new StringBuffer( super.toString() );
136 buffer.append( "[ connection: " );
137 buffer.append( connection );
138 buffer.append( " subject: " );
139 buffer.append( subject );
140 if ( selector != null ) {
141 buffer.append( " selector: " );
142 buffer.append( selector );
143 }
144 if ( servlet != null ) {
145 buffer.append( " servlet: " );
146 buffer.append( servlet );
147 }
148 else {
149 buffer.append( " messageListener: " );
150 buffer.append( messageListener );
151 }
152 return buffer.toString();
153 }
154
155 }