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