public class Sources
extends java.lang.Object
Constructor and Description |
---|
Sources(XdEnvironment xdEnvironment)
Construct a new Sources instance using the provided environment.
|
Modifier and Type | Method and Description |
---|---|
SimpleFileSource |
file(java.lang.String dir,
java.lang.String fileName)
Construct a new SimpleFileSource using the provided directory and filename
|
SimpleHttpSource |
http()
Create an instance of the http source with the default target host (localhost) and default port (9000).
|
SimpleHttpSource |
http(java.lang.String host)
Create an instance of the http source with the default target host and default port (9000).
|
SimpleHttpSource |
http(java.lang.String host,
int port)
Create an instance of the http source with the default target host and provided port
|
JmsSource |
jms()
Construct a new JmsSource using the default JMS Broker host and port as specified in the environment
|
MqttSource |
mqtt()
Construct a new MqttSource using the default RabbitMQ (MQTT-enbaled) broker host as specified in the environment.
|
RabbitSource |
rabbitSource()
Construct a new RabbitSource using the environment and defaults.
|
SyslogTcpSource |
syslogTcpSource()
Constructs a SyslogTcpSource that receives syslog events via tcp.
|
SyslogTcpSource |
syslogTcpSource(java.lang.String host)
Constructs a SyslogTcpSource that receives syslog events via tcp.
|
SyslogUdpSource |
syslogUdpSource()
Constructs a SyslogUdpSource that receives syslog events via udp.
|
SyslogUdpSource |
syslogUdpSource(java.lang.String host)
Constructs a SyslogUdpSource that receives syslog events via udp.
|
SimpleTailSource |
tail(int delayInMillis,
java.lang.String fileName)
Construct a new SimpleTailSource with the the provided file name and delay
|
Tap |
tap(java.lang.String streamName)
Constructs a Tap fixture.
|
TcpSource |
tcp()
Construct a new TcpSource with the default target host localhost and port (1234)
|
TcpSource |
tcp(java.lang.String host)
Construct a new TcpSource with the default target host taken from the environment and default port (1234)
|
TcpSource |
tcp(java.lang.String host,
int port)
Construct a new TcpSource with the default target host taken from the environment and the provided port.
|
TwitterSearchSource |
twitterSearch(java.lang.String query)
Construct a TwitterSearchSource using that will search for the query string provided..
|
TwitterStreamSource |
twitterStream()
Construct a TwitterStreamSource fixture..
|
public Sources(XdEnvironment xdEnvironment)
xdEnvironment
- the environment with information on what port/hosts to connect topublic SimpleHttpSource http()
public SimpleHttpSource http(java.lang.String host)
host
- the host ip where http data will be posted.public SimpleHttpSource http(java.lang.String host, int port)
host
- the host ip where http data will be posted.port
- the port to connect topublic TcpSource tcp()
public TcpSource tcp(java.lang.String host)
host
- the host ip where tcp data will be posted.public TcpSource tcp(java.lang.String host, int port)
host
- the host ip where tcp data will be posted.port
- the port to connect topublic SimpleTailSource tail(int delayInMillis, java.lang.String fileName)
delayInMillis
- on platforms that don't wait for a missing file to appear, how often (ms) to look for the
file.fileName
- the absolute path of the file to tailpublic JmsSource jms()
public MqttSource mqtt()
public SimpleFileSource file(java.lang.String dir, java.lang.String fileName)
dir
- directory namefileName
- file namepublic RabbitSource rabbitSource()
public TwitterSearchSource twitterSearch(java.lang.String query)
query
- The string to search for on twitter.public TwitterStreamSource twitterStream()
public SyslogTcpSource syslogTcpSource(java.lang.String host)
host
- the ip of the machine where simulated syslog traffic will be sent.public SyslogTcpSource syslogTcpSource()
public SyslogUdpSource syslogUdpSource(java.lang.String host)
host
- the ip of the machine where simulated syslog traffic will be sent.public SyslogUdpSource syslogUdpSource()
public Tap tap(java.lang.String streamName)
streamName
- The name of stream to tap