use of org.apache.reef.tang.JavaConfigurationBuilder in project mist by snuspl.
the class MqttFilterApplication method main.
/**
* Set the environment(Hostname and port of driver, source, and sink) and submit a query.
* @param args command line parameters
* @throws Exception
*/
public static void main(final String[] args) throws Exception {
final JavaConfigurationBuilder jcb = Tang.Factory.getTang().newConfigurationBuilder();
final CommandLine commandLine = MISTExampleUtils.getDefaultCommandLine(jcb).registerShortNameOfClass(// Additional parameter
NettySourceAddress.class).registerShortNameOfClass(MqttSourceTopic.class).registerShortNameOfClass(MqttSinkTopic.class).registerShortNameOfClass(FilteredString.class).registerShortNameOfClass(ApplicationIdentifier.class).processCommandLine(args);
if (commandLine == null) {
// Option '?' was entered and processCommandLine printed the help.
return;
}
final APIQueryControlResult result = submitQuery(jcb.build());
System.out.println("Query submission result: " + result.getQueryId());
}
use of org.apache.reef.tang.JavaConfigurationBuilder in project mist by snuspl.
the class RuleBasedHelloMist method main.
/**
* Set the environment(Hostname and port of driver, source, and sink) and submit a query.
* @param args command line parameters
* @throws Exception
*/
public static void main(final String[] args) throws Exception {
final JavaConfigurationBuilder jcb = Tang.Factory.getTang().newConfigurationBuilder();
final CommandLine commandLine = MISTExampleUtils.getDefaultCommandLine(jcb).registerShortNameOfClass(// Additional parameter
NettySourceAddress.class).processCommandLine(args);
if (commandLine == null) {
// Option '?' was entered and processCommandLine printed the help.
return;
}
Thread sinkServer = new Thread(MISTExampleUtils.getSinkServer());
sinkServer.start();
final APIQueryControlResult result = submitQuery(jcb.build());
System.out.println("Query submission result: " + result.getQueryId());
}
use of org.apache.reef.tang.JavaConfigurationBuilder in project mist by snuspl.
the class RuleBasedMQTTNoiseSensing method main.
/**
* Set the environment(Hostname and port of driver, source, and sink) and submit a query.
* @param args command line parameters
* @throws Exception
*/
public static void main(final String[] args) throws Exception {
final JavaConfigurationBuilder jcb = Tang.Factory.getTang().newConfigurationBuilder();
final CommandLine commandLine = MISTExampleUtils.getDefaultCommandLine(jcb).processCommandLine(args);
if (commandLine == null) {
// Option '?' was entered and processCommandLine printed the help.
return;
}
Thread sinkServer = new Thread(MISTExampleUtils.getSinkServer());
sinkServer.start();
final APIQueryControlResult result = submitQuery(jcb.build());
System.out.println("Query submission result: " + result.getQueryId());
}
use of org.apache.reef.tang.JavaConfigurationBuilder in project mist by snuspl.
the class SessionWindow method main.
/**
* Set the environment(Hostname and port of driver, source, and sink) and submit a query.
* @param args command line parameters
* @throws Exception
*/
public static void main(final String[] args) throws Exception {
final JavaConfigurationBuilder jcb = Tang.Factory.getTang().newConfigurationBuilder();
final CommandLine commandLine = MISTExampleUtils.getDefaultCommandLine(jcb).registerShortNameOfClass(// Additional parameter
NettySourceAddress.class).processCommandLine(args);
if (commandLine == null) {
// Option '?' was entered and processCommandLine printed the help.
return;
}
Thread sinkServer = new Thread(MISTExampleUtils.getSinkServer());
sinkServer.start();
final APIQueryControlResult result = submitQuery(jcb.build());
System.out.println("Query submission result: " + result.getQueryId());
}
use of org.apache.reef.tang.JavaConfigurationBuilder in project mist by snuspl.
the class UnionMist method main.
/**
* Set the environment(Hostname and port of driver, source, and sink) and submit a query.
* @param args command line parameters
* @throws Exception
*/
public static void main(final String[] args) throws Exception {
final JavaConfigurationBuilder jcb = Tang.Factory.getTang().newConfigurationBuilder();
final CommandLine commandLine = MISTExampleUtils.getDefaultCommandLine(jcb).registerShortNameOfClass(// Additional parameter
UnionLeftSourceAddress.class).registerShortNameOfClass(// Additional parameter
UnionRightSourceAddress.class).processCommandLine(args);
if (commandLine == null) {
// Option '?' was entered and processCommandLine printed the help.
return;
}
Thread sinkServer = new Thread(MISTExampleUtils.getSinkServer());
sinkServer.start();
final APIQueryControlResult result = submitQuery(jcb.build());
System.out.println("Query submission result: " + result.getQueryId());
}
Aggregations