1
2
3
4
5
6
7
8
9
10 package org.mule.transport.http;
11
12 import org.mule.api.MuleContext;
13 import org.mule.api.config.MuleProperties;
14
15 import java.util.Properties;
16
17
18
19
20
21
22
23 public class HttpPollingConnector extends HttpConnector
24 {
25
26
27
28 private long pollingFrequency = 1000L;
29
30
31
32
33 private boolean discardEmptyContent = true;
34
35
36
37
38 private boolean checkEtag = true;
39
40 public HttpPollingConnector(MuleContext context)
41 {
42 super(context);
43 serviceOverrides = new Properties();
44 serviceOverrides.setProperty(MuleProperties.CONNECTOR_MESSAGE_RECEIVER_CLASS, PollingHttpMessageReceiver.class.getName());
45 }
46
47 public boolean isDiscardEmptyContent()
48 {
49 return discardEmptyContent;
50 }
51
52 public void setDiscardEmptyContent(boolean discardEmptyContent)
53 {
54 this.discardEmptyContent = discardEmptyContent;
55 }
56
57 public long getPollingFrequency()
58 {
59 return pollingFrequency;
60 }
61
62 public void setPollingFrequency(long pollingFrequency)
63 {
64 this.pollingFrequency = pollingFrequency;
65 }
66
67 public boolean isCheckEtag()
68 {
69 return checkEtag;
70 }
71
72 public void setCheckEtag(boolean checkEtag)
73 {
74 this.checkEtag = checkEtag;
75 }
76 }